Hi -
Our Purchase Request workflow needs to be updated so if users leave "None" selected in the "No Approval Required?" custom field, the issue will transition directly to REQUESTED.
Likewise, if something else (NOT None) is selected, the issue would go to APPROVED.
Currently, when the issue is created, its left at a NEW REQUEST status.
I have not had luck with setting up a 'condition' 'value field' - Do I need to utilize Script Runner? I have tried as well with no luck. Any help is appreciated, thank you.
Custom Field:
Another way to handle this is to create an Automation Rule as mentioned by Aswin above. Within the project, go to Settings - you should then see the dark blue navigation bar on the left. look for "Automation". Click on that. In the upper right, click "Add Rule". choose "Custom Rule" at the top. Click Continue. "When this happens..." choose "Issue Created" click Add.
Then click “Add condition” button. Under “If these match…” click “Issue matches” then click “Advanced”. (it will be a blue hyperlink) In the code box which appears begin typing the name of your custom field. "No Approval Required” and select it once it shows up and hit the space bar once. Then type the “=” or select it from the drop down that appears. Hit the space bar after the “=” and you should see another drop down and you can select “None”. ("No Approval Required" = "None") Then click Add.
Then, under “Then do this…” select “Transition Issue” and you should see the option in the drop down for “Requested”
Click Save.
Note this will only work for the project you currently are in. Not for any of the other projects associated with the workflow you have in that project. (if that workflow is shared with other projects). So, you would have to repeat this process for every project where you need this functionality. To get this to work across multiple projects sharing the same workflow you would have to add a post function to that workflow.
Thank you Mike! Very glad I could help. Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Joe! Worked like a charm. Why is everyone recommending Script Runner, phew!?! Because of those answers the task seemed more daunting at first than it was.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jo , I read your answer and I tried to perform the same thing on my project but it didn't work.
I think the reason is that the custom field value was changed only after the issue was created.
Is there a way to change status automatically when a value of a custom field is changed, even after the issue was created?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ScriptRunner has built-in script, Fast track transition an issue, that you could use that checks if your custom field has then None value and if true, fast track the issue to Requested.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's what I have been playing with, I wanted to confirm I was going in the right direction. Thank you.
I selected the Project KEY,
However, when I create a new issue using Batteries, the status is not changed to Delivered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira cannot trigger transition based on the field value. You might need Automation for Jira, ScriptRunner as you mentioned or writing your own custom field with this behavior.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Script runner custom Event in theory would do this, in practice when the IssueUpdated event is raised the Issue is in an inconsistent state and transitioning it would fail. It seems to be a not well publicized limitation of the current Jira event implementation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.