Global toggle button in main toolbar with ScriptRunner possible?

Tuelle November 22, 2017

Hi,

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

Tuelle 

1 answer

1 vote
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 22, 2017

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.

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 22, 2017
Tuelle December 6, 2017

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

Tuelle

Like Rodolfo So likes this
Thanos Batagiannis _Adaptavist_
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.
December 6, 2017

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.

Rodolfo So April 23, 2022

@Tuelle 

 

Is it possible to share your code on how you implement this? I have the same scenario.

 

Appreciate your response on this.

Thanks

Suggest an answer

Log in or Sign up to answer