Can anyone suggest me an automation rule , to make the below condition
To have a incremental field that is automatically populated on creation, with the value "REQ.(N+1) where N(Incremental) is the value from the most recently created story., and whenever a issue type = story is deleted, Then it has to continue the Next Incremental value , when a new story issue is created.
Regards,
Abhi
Hi @Abhi
To do what you ask, increment the value from the "most recently created story", you must first find the most recently created story.
You appear to be using Jira Server / Data Center version of automation. The action Lookup Issues would make this easier, but that is still in progress of being released: https://jira.atlassian.com/browse/JIRAAUTOSERVER-53
A work-around is to call the REST API to get the most recently created story, using JQL to ORDER BY Created DESC, and then use the first record's field value for the increment.
Kind regards,
Bill
@Abhi I would suggest creating two automation, one for incrementing (+1) REQ when story is added and another one for decrementing (-1) when a story is removed.
For both of your automation listen to issue creation trigger and then check within an If/else block if it is a story issue type. Upon confirming Edit issue and increment/decrement your field's value.
To Increment use the following smart value:
{{#=}}{{issue.field name}} + 1{{/}}
To Decrement use the following smart value:
{{#=}}{{issue.field name}} - 1{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sayed Bares _ServiceRocket_
Thanks for your reply.
Sorry to this say, this is not working, infact the value of number field example(Incremental ID) , is not getting increased with every story created, the value of the field always results in 1.
I have attached the automation rule.
Regards,
Abhi
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.