Global toggle button in main toolbar with ScriptRunner possible?


Our POs frequently look at Jira Screens together with customers, e.g. for discussing details of issues. We also track our working time per issue in Jira. We don't want the customer to see this information.

If the customer logs into the system the permission scheme denies access to this information for the customer. The problem is that if they work together with the PO on an issue by screen sharing, the information is displayed because the PO is logged in and has the required permission. 

The solution that came to our mind is to introduce a toggle button or check box "Data Privacy" in the main tool bar of Jira. If this button is activated during a screen sharing session, we want to use ScriptRunner to hide certain fields in any project. Hiding is supported by Jira/ScriptRunner, but we are not sure how about the following:

- Is it possible to place (with ScriptRunner) a toggle button/checkbox in the main toolbar of Jira?

- Is it possible to read out the state of the toggle button from a Groovy script?

- Is it possible to make the state of the toggle button a little bit more persistent, e.g. in a Cookie so that it keeps its state during a browser reload?

Thanks in advance for any hint


1 answer

1 vote

You can use "Script fragments" to install a web resource which is basically a javascript that will hide the intended fields.

Though not among the most straightforward things to do as I feel there is lack of sample documentation for this kind of examples. May be contact someone from plugin support for samples.

Thanks, we actually decided to use ScriptRunner to toggle (via a REST end) the value of a property that is saved in the user profile. The property is the read out from a javascript which hides certain DOM elements depending in the properties value.


Thanks for the tip


Hi @Tuelle, interesting use case. Great to hear that you manage to implement it. 

@Tarun Sapra you are right, we do not have many example use cases or recipes, especially for the web fragments. But we are working on it, and hopefully really soon we will improve it. 

Thank you both.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

748 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you