Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,347
Community Members
 
Community Events
165
Community Groups

Automation rule: Chage priority field only for jira-admins

Edited

Hi

I tried to create an automation rule for the priority field of the ticket.

Only admin can change priority, but it not actually work.

What I am doing wrong?

Trigger:

When: Value changes for

    priority

Condition:

Initiator is not in

  • jira-administrators

Action:

Then: Transition the issue to

same status (loop)

1 answer

0 votes
Stefan Salzl Community Leader May 09, 2022

Hi @Aleksey Plisko and welcome to the community,

what are you actually trying to do with the transition action in the end? The transition will only change the status but won´t touch the priority field.

As far as I got your requirement right you´d like to rollback the priority field in case somebody NOT in admin group changed the field. Could you confirm this?

If so I would suggest to work with fieldChange smart value. {{fieldChange.fromString}} will give you the value of the field before the change. If condition is true the value can be set back using this smart value. see detailed documentation here:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--eventType--

Hope this was helpful.

Best
Stefan

Yeah, you got it right.

Could you provide me please an example of how to use it?

And where do I actually enter these smart values/commands?

Thank you in advance

Like Stefan Salzl likes this
Stefan Salzl Community Leader May 11, 2022

Hi @Aleksey Plisko 

instead of an transition action add an "edit issue" action and edit the field "priority" to the the value you got from smart value of {{fieldChange}}.

Best
Stefan

Like this? And after I can add the smart value?

Screenshot 2022-05-11 085757.png

Stefan Salzl Community Leader May 11, 2022

Add the smart value directly to this action, not after it. The action is executed when condition is true

so:

WHEN

  • initiator is NOT member of group jira-admin

THEN

  • edit field to previous value --> which is set via smart value {{fieldChange.fromString}}

 

Within the edit issue action for field "Priority":
This is currently set to "copy from current issue" --> change this to the smart value
You can click into this field and write your smart value into the field (see screenshot)

image.png

Best
Stefan

Hi Stefan,

I've tried what you suggest before and found that, in When you can not enter "initiator is NOT member of group jira-admin". You only have some standard triggers, nothing related to groups of users.

I tried it the other way, but still no success.

Screenshot 2022-05-12 163124.png

Like Stefan Salzl likes this
Stefan Salzl Community Leader May 17, 2022

@Aleksey Plisko 

I´m a bit confused. Weren´t you able to check this condition in your previous screenshot?

Best
Stefan

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Service Management

Jira Service Management Documentation Opportunities

Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...

295 views 0 8
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you