How to do automation of rule for the transistion of the task ?

SUMUKHA HATWAR K N October 10, 2023

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.

1 answer

0 votes
Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2023

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

SUMUKHA HATWAR K N October 12, 2023

Hi @Rudy Holtkamp 

 

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

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 12, 2023

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.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 12, 2023

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

SUMUKHA HATWAR K N October 12, 2023

Hi @Rudy Holtkamp  and  @Bill Sheboy , Thank you. 

 


Screenshot 2023-10-13 094904.jpgScreenshot 2023-10-13 094949.jpg


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 

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 12, 2023

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.

Like Bill Sheboy likes this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2023

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.

Suggest an answer

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

Atlassian Community Events