Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set a Label using a Button

Roland February 27, 2020

Hello,

I want to give users the possibility to set an explicit label. I introduced this by using css to hide the label overview and create 2 buttons (to add and remove). Can you give me a hint how to do this best?

Adding would have worked like this:
jQuery.post(contextPath + "/json/addlabelactivity.action", {"entityIdString": "$content.id", "labelString": label, "atl_token": jQuery("#atlassian-token").attr("content") }, function() {
jQuery("#label-to-add").val("");

However, removing via this way (removelabelactivity.action) does not work.
i am using Confluence 7.2.

Greetings, Roland

 

2 answers

Roland March 2, 2020

Hello Christian,

thanks for your information. Yes, but it only works with addlabelactivity.action, remove.labelactivity.action don't work in my confluence.

0 votes
Suhas P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2020

If you have script runner plugin, you can achieve this by the combination of Script Fragment and REST endpoint. 

Roland February 27, 2020

Unfortunately I am not using the script runner plugin. I hope for alternative ideas ;-)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events