Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Automations

Bridget Martin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2021

Hello, 

I am new to Jira and am looking for some insight. 

I am looking to use automations to help with rescheduling issue dependencies. 

My ideal workflow I am trying to achieve is as follows:

- Due date for task A is moved 5 days out

- Start date and due date for linked task B is moved out by 5 days

Ideally I want task B to move by how ever many days I moved task A by. So far I have only been able to move the due date by a standard timeframe (ie {{issue.startDate.plusDays(7)}}). The automation for the start date removes the start date all together. I am not sure what I have done wrong. I have attached a screen shot of how my rule is currently set up. 

Any suggestions are appreciated. 

unnamed.png

 

1 answer

0 votes
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 Champions.
September 17, 2021

HI @Bridget Martin -- Welcome to the Atlassian Community!

You may do that with the changelog smart value: https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/#Smartvaluesgeneral---changelog--

For example, performing a difference on the from/to values to use in the increment:

{{changelog.duedate.from.diff(changelog.duedate.to).days}}

Also, please consider adding a couple of conditions after your trigger to confirm that the from/to values are not empty...or use an if/else structure to handle those edge cases.

Kind regards,
Bill

Bridget Martin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2021

Thank you so much for your response @Bill Sheboy

I have tried multiple ways of configuring the automation and have not been able to get it to work with the smart value. 

Any idea what I could be doing wrong?

automation 1.PNG

Automation 2.PNG

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 Champions.
September 20, 2021

Hi @Bridget Martin 

First let's confirm what I provided and you are using is working.  So try writing that smart value directly to the audit log, perhaps with some text:

Days difference: {{changelog.duedate.from.diff(changelog.duedate.to).days}}

Next, I see a couple of things in your rule:

a) At this time, created variables cannot be used as parameters to functions.  The possible work-arounds are to use the value directly in the function call, or to set it to an entity property and then use it.  Please try the first work-around...first...such as:

{{issue.duedate.plusDays(changelog.duedate.from.diff(changelog.duedate.to).days)}}

b) More importantly, you wanted to iterate over the linked/blocked tasks to update them, but that is not what your branch does.  Please try using a branch with JQL instead to find the issues with those links and types.  For example:

issue in linkedIssues( {{triggerIssue.key}} , "blocks" )

Please test this JQL stand-alone first with some example to see that it produces what you expect.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events