How to do automation of rule for the transistion of the task from one status to other status on the basis of the commit message. If there is a Done/done/DONE key words are there then it status should be changed.
Hi @SUMUKHA HATWAR K N ,
Welcome to the community!
You need to create a rule that triggers on 'Commit created'
Condition: issuetype = task
Then you can use the advanced compare:
First value: {{commit.message}}
Condition: exact matches regular expression
Regular expression: Done|DONE|done
Then transition to Done.
I hope this helps.
PS you can check the documentation here
Thanks for the reply ,
I have tried this earlier and this didn't work the way i wanted. The transistion did not take place.
Commit consists of Issue key at the starting and followed by some message and then done keyword will be there.
For example :
Commit message = "SAP-183 The version of the word-wrap causing security risk has been updated and the work is done."
or
Commit measge = "SAP-183 The issue is solved. Done"
I need jira to accept this commit message and transit the status of the issue to the Done.
Thanks in advance.
__PRESENT
__PRESENT
__PRESENT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to the documentation 'Commit created' is the only trigger which allows you to use {{commit}} as smart value.
So if it does not work, then this seems to me that it is a bug and you need to report it to Atlassian, so they can investigate it.
Otherwise the trigger is useless.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @SUMUKHA HATWAR K N -- Welcome to the Atlassian Community!
Adding to Rudy's answer and to confirm what you are observing...
Please post images of your complete automation rule and of the audit log details showing the rule execution.
Those will confirm we have a shared understanding of what you have tried. Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Rudy Holtkamp and @Bill Sheboy , Thank you.
This is the automation rule i have tried .
Before trying it on the main project i am just trying on some dummy project .
Here for the automation rule
I created a rule that triggers on 'Commit created'
Condition: issuetype = task
Then the advanced compare:
First value: {{devops.commit.message}}
condition: contains regular expression
second value: {{issue.key}}( Done|DONE|done) # Here i tried with few others also , like [ (?si)(\bDone.\b|\bdone\b|\bDONE.\b) ] , [ ( Done | Done\.) ] But none of them worked.
Action: Transition to review
Action : Send an email.
This is the automation i have tried. Transition is not happening when the commit is created. Commit message which i used is " SEC-7 Update Readme.md Done."
Thanks and Regards ,
- Sumukha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @SUMUKHA HATWAR K N ,
As far as I know {{devops}} is not a smart value and since you don't create the variable yourself it does not have a value.
You should use {{commit.message}} instead, see this documentation.
For the first value I would recommend to use: {{commit.message.toUpperCase()}}
Condition: contains regular expression
Second value: DONE
And I urge you to use Log Action: '{{commit.message}}' as first action, just after the trigger. Then you know if commit has a value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to what Rudy suggests: I find the documentation is not always accurate on the casing of the messages provided. Consider forcing to upper (or lower) case before comparing. Writing the values from the trigger to the audit log will confirm this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.