Forums

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

How to allow to change value of 2 custom fields to 4 specific users (or group jira admins) only?

Alex Ivanov August 17, 2023

Hello, i need to do it in Jira cloud, tried via automation but it does not work, someone telling me to do it via scriptrunner, but hard to find information for scriptrunner cloud usage. Screenshot 2023-08-17 at 21.46.25-min.png

1 answer

1 vote
Diogo Teles
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.
August 17, 2023

Hi Alex,

There are no granular permissions for field editing in the exact way that you are looking for. However there are ways to do it with Jira without using additional addons. You can create a transition to self, one that loops back into the same status. You can also

-Create one that loops back from any status to any status, so it will be available independently of the current issue status.

-Then, create a transition screen with the fields that you want to be editable by specific users.

-In the workflow set a transition condition for your new transition so that only those users can action it. Then associate it to your new transition screen. 

-Finally, make sure that you have a screen associated to the edit action and remove the fields that you don't want edited from it.

This is a very summarised way of doing it. I have a post with more detail on how how to achieve this on linkedin, if you are interested.

Let me know if you want to try this and need more help to execute.

Cheers,

Diogo

Diogo Teles
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.
August 17, 2023

Just to add, there are other ways of doing this. With automation, for example, you can set a rule that if the fields were edited by someone that is not in a certain group then automation reverts it back to the previous value. This is not really preventing an edit, but in the end it would restrict any lasting change of the value to the users you want. With automation you have the added bonus of being able to add a comment to the trigger user explaining why they are not allowed to edit it, if you wish.

This option is less onerous on the admin site, but less tidy on the frontend. 

Like Alex Ivanov likes this
Alex Ivanov August 17, 2023

Thanks for answer Diogo, in my screenshot i tried to make this automation that didnt work, whats wrong is there? should i make this custom field "read-only"? Will try to do it via transitions way if this one not gonna work properly. 

Alex Ivanov August 18, 2023

@Diogo Teles 

{
"fields": {
"customfield_10157": "{{issue.customfield_10157.previousValue}}",
"customfield_10158": "{{issue.customfield_10158.previousValue}}"
}
}

this code for returning previous value doesnt work, maybe you know what i can do with it?

getting this error: (Specify a valid 'id' or 'name' for Internal Severity (customfield_10157), Specify a valid 'id' or 'name' for External Severity (customfield_10158))

Diogo Teles
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.
August 23, 2023

Hi @Alex Ivanov 

To do this with automation you can use an approach that does not require JSON. Check the screenshots below for an example rule you could use (replace the field name 'Agent' by your custom field name),

2023-08-23 15_34_14-Automation - Jira@GDS.png

 

Detail view of the actions

2023-08-23 15_35_22-Automation - Jira@GDS.png

2023-08-23 15_36_13-Automation - Jira@GDS.png

2023-08-23 15_39_23-Automation - Jira@GDS.png

Result

2023-08-23 15_41_32-[TRP-32120] 12478 10kN LF & Accessories LF ACC - Jira@GDS.png

Issue history

2023-08-23 15_42_30-[TRP-32120] 12478 10kN LF & Accessories LF ACC - Jira@GDS.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events