The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new 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 Champions.
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 ;-)

TAGS
AUG Leaders

Atlassian Community Events