Due Date automations based on labels

Candice Gerard April 26, 2023

Two days in with no result to show, and feeling quite stupid. 

1 - I am using labels values of day counts -90 days to 45 days. 

2- I want to make a global automation for my projects that look for changes in due date on issues with a "0" value as a label. 

3- If there are changes to the due date to that item, I would like due dates for the rest of the project items to be updated with that due date MINUS the number value held in their own label.    For examples, I change the due date on my 0 items to 5/30/2023, all due dates of other non completed items with a labels value of 30 should change to 4/30/2023.  

Currently, I can get all the due dates to update to NULL. when triggered by my 0 item,,  which is not helpful.    Is anyone willing to help this total noob at Jira?  I would really appreciate it.  

 

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 26, 2023

Hi Candice - Welcome to the Atlassian Community!

First, can you share the rule that you have so far?

Next, why are you using a labels field and not just a number field for the numeric value? 

Candice Gerard May 4, 2023

John, Thanks for the thoughts.  I have added and deleted so many rules, trying to get the labels to work I didn't even THINK about adding a field.   I have done so now and I am still having challenges, and I believe they are just because I am a novice. 

My rule is when values change for due date in condition "Days before live" = 0

Then  a branch for "Days Before Live" !=  edit issue field, due date. 

{{issue.fields.duedate.plusDays(-issue.fields.customfield_10037.intValue())}}

I have also tried with {{issue.fields.duedate.plusDays(-issue.fields.customfield_10037)}}

All the issues under branch rule/ related issues show up as referenced in the audit log.  (which is the same as when I was using the label values) I just cant seem to get the target due date from changed issue X to update the due dates on issues X, Y and Z. 

We have several projects that are concurrent with moving "live" dates due to legal and licensing delays and manually changing all the tasks to get to that live date when it changes is becoming irritating.  If the tasks could just reassign due dates based on the live date, it would sure be handy!

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2023

Can you post a screenshot of your actual rule? It's much easier for me to evaluate when I can see the visual. 

And tell me again the relationship between the issues? Is it just issue linking? Or is there a parent/child relationship?

Candice Gerard May 7, 2023

Thank you so much for offering to help, as I am learning, I am sure this is just something that I don't understand how to achieve.   It seems to me that the target and related issues are being identified, but yet I don't have the update statement correct.   Any help in fixing this, or pointing me to resources to learn more about the update statements is 100% appreciatedCapture1.JPGCapture2.JPG

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Hi Candice - so sorry it has been this long! Yeah, I don't think you are going to be able to use syntax like that for the second part where you are using the minus. Try using a variable instead of the issue.field name part. 

https://support.atlassian.com/analytics/docs/date-and-time-functions-for-variables/

Candice Gerard May 23, 2023

Hey John

No worries, I am finding out more on my own as I seek out resources in learning for Jira.  I am understanding the overall product better now and I think I need to go back to the original setup of the project and reorganize to get what I want done.    I really do appreciate the time you took to review my question, and give me another direction to learn.   

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

I hope I helped at least a little. Let us know what further questions you have with your re-work. 

Also, maybe @Bill Sheboy can add some expertise!

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.
May 24, 2023

Hi @Candice Gerard and @John Funk 

It would seem that something like this would work...

{{issue.fields.duedate.plusDays(-issue.fields.customfield_10037.intValue())}}

However the math operations for smart values only support two syntaxes: inline or math expression.  Perhaps try the inline syntax:

{{issue.duedate.plusDays(issue.customfield_10037.intValue().multiply(-1))}}

 

Kind regards,
Bill

Like John Funk likes this

Suggest an answer

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

Atlassian Community Events