Description field lock for users

Tudor Lala August 5, 2020

Hi, I am using Jira service desk and use some tickets in a specific group to store some of the users access, I created a issue type and each ticket under that group is individual to each user and in the description i keep a list of access to different systems for that user. The problem is that i run the risk of users editing the field, or deleting the information by mistake.  Is there a way to block this so only agents can edit ? 

 

Thank you. 

2 answers

2 accepted

1 vote
Answer accepted
Daniel Ebers
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.
September 21, 2020

Hi Tudor,

in case you have already installed App "ScriptRunner" you can do it using Behaviours. The advantage is that is saves you creating some screens.

On the other hand the App is, indeed, one that requires extra purchasing/payment. In case you have several other use cases which requirements can be met using ScriptRunner it might be worth a look.

Cheers,
Daniel

Sneha Kumari May 12, 2021

Hello @Daniel Ebers 

Can you please explain how can we lock the field using Behaviours in ScriptRunner.

Thanks in advance.
Sneha

Daniel Ebers
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.
May 15, 2021

Hi @Sneha Kumari

sure thing! On https://scriptrunner.adaptavist.com/5.6.8/jira/behaviours-overview.html you will find documentation for Behaviours and especially documentation on making fields read only.
You also can narrow this down to groups.

This is what the documentation refers to in the beginning:

Making a field read-only dependent on user role or group

There is also a very nice tutorial available:
https://scriptrunner.adaptavist.com/5.6.8/jira/tutorials/behaviours-tutorial.html

Don't be worried if this looks overwhelming on first sight - Behaviours are very powerful. However, for making a field read-only usually no code is required.

I hope this helps a bit to get things off the ground.

Sneha Kumari May 20, 2021

Hi @Daniel Ebers 

Thanks for the information. But I am looking for the solution for my Cloud instance. Behaviours functionality is not available for Jira Cloud. 

Could you please help me.

I want to lock a field "Reporter" in my Jira cloud instance. It should not be editable by any user during any transition. The field should not be able to edit in the full issue view as well.

Please provide the solution for the same.

Thanks in advance.

Sneha

Daniel Ebers
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.
May 21, 2021

Hi @Sneha Kumari

I was under the assumption your ask is for "Server" as there was no indication you would be using Jira Cloud. The initial requestor tagged the question with "Server" so without further explanation we assumed you would be asking for Server, also.

On Jira Cloud there is no behaviours with Script Runner, I am afraid.

For especially preventing the "Reporter" to be modified you can adjust the "Permission Scheme" assigned to the project:

https://support.atlassian.com/jira-service-management-cloud/docs/overview-of-jira-cloud-permissions/

The permissions is called "Modify Reporter".
Note: when you adjust the setting in the "Permission Scheme" it will apply to any project assigned with it. Also this will not consider specific transitions - the setting will apply to the project as such. From what I understood from your requirement this would meet your use case still because not being able to edit the field during any transition, as well as prevent to have it edited on full issue view as well, is basically exactly the setting "Modify Reporter" from "Permission Schemes".
No need for Behaviours here, unless I am missing something.

I hope this helps to adjust the permissions.

Regards,
Daniel

Sneha Kumari May 23, 2021

@Daniel Ebers  Thank you for the response. It works fine now.

1 vote
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 5, 2020

Hi Tudor,

In cases like that, we include field in just the Create Screen and View Screen and then remove it from the Edit Screen in the screen scheme.

Then we create a transition screen with the field and attach it to the appropriate transition in the Workflow. Then we put a condition on the transition so that only Agents can execute the transition. Or if it doesn't apply to a particular transition, we create a looping transition back to the same status and only allow Agents to access that transition. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events