Forums

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

Automation to edit custom cascade field based on user permission

Natalia Trofimov
Contributor
October 20, 2022

Hi, I need to create the automation to allow editing of a custom cascade field based on user permission (i.e. group)

Something like this 

Screen Shot 2022-10-20 at 4.32.15 PM.png

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Champion
October 20, 2022

Hi @Natalia Trofimov 

The best approach would be to:

  • Make the specific field read-only (meaning remove it from the edit issue screen)
  • On the workflow(s) of your issue type(s) create a self transition called e.g. "Change Field Value"
  • On that transition add a condition to be visible only for user who belong to your desirable groups.
Natalia Trofimov
Contributor
October 20, 2022

Hi Alex, I tried it, and yes, it works but it is messing up with all my other automations and the issue security levels that are based on that custom field. they stopped working

Alex Koxaras _Relational_
Community Champion
October 20, 2022

@Natalia Trofimov morning!

For your rule to work I would keep only the components to edit the old value. The rest, as I see it, are obsolete. Then edit the issue and use the advance editing field and enter the following JSON:

{
"fields": {
"YOURFIELDNAME": { "value": "{{#changelog.YOURFIELDNAME}}{{fromString}}{{/changelog.YOURFIELDNAME}}"}
}
}

Replace the YOURFIELDNAME with your field.

Example of my rule below:

advance editing.png

Natalia Trofimov
Contributor
October 21, 2022

Hi Alex,

the automation didn't work for me well so I used your first approach with the workflow transition. I just added the "transition" in addition to "edit" and "create" in other automation rules on the value changes and it worked!

Screen Shot 2022-10-21 at 12.59.06 PM.png

Thank you very much for your help!!!

Natalia

Alex Koxaras _Relational_
Community Champion
October 21, 2022

Good to know that @Natalia Trofimov !

Suggest an answer

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

Atlassian Community Events