We have a project where one task issue blocks other issues. If the start date is changed, then all blocked issues should change as well. Same goes for start date.
When the date changes, we'd like to have the blocked issues update by the same number of days as the one blocking it. However, I'd also like the automation to not touch any blocked issues with blank values.
For example:
I'm trying to get the smart values to work but am unfamiliar with those and have hard time know what can get me the results I want above.
Here's what I have so far:
But I'm not sure about the smart values and I'm also not sure if I should have the Start and Due Dates in one automation or separate them out. Can anyone help?
Hello @Jespir Ragbotra
You can find information about smart values in the Automation documentation here:
https://support.atlassian.com/cloud-automation/docs/smart-values-in-jira-automation/
If Task A is blocked by Task B, does the Start Date of Task B have any bearing on when Task A can be started? It seems like really only a change to the Due Date of Task B is relevant to the start of Task A.
To accomplish what you want you will need to reference the functions that you can use to manipulate dates and times:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#--
One thing that you will have to do is figure out how many days difference there is between the original date and the new date. When you use the Field Value Changed trigger you can reference the original value of the changed field with
{{fieldChange.from.toDate}}
and the new date you specified with
{{fieldChange.to.toDate}}
You need the toDate function to convert the values stored in the change history from text to Dates.
To find the number of days difference between those you can use the diff function:
{{fieldChange.from.toDate.diff(fieldChange.to.toDate).days}}
If you assign that to a variable dateDiff (using the Create Variable action) then you can use that number to update the value of other date fields with the plusDays function. For example if you want to update the Due date field:
{{issue.duedate.plusDays(dateDiff)}}
If you don't want to update issues that have blank dates, then add Conditions to check that the date fields are not Empty.
Let us know if you need more guidance.
Hi Trudy,
I have a similar case and tried your rule (adjusted to my case) but got a blank result of the calculation. The rule literally deleted the Start Date of the blocked issue after I edited the End Date of the blocking issue. Do you know what might be the cause of it?
My formula for updating the Start Date of the blocked issue based on the change of the Due Date of the blocking issue is:
{{issue.Start Date.plusDays (triggerIssue.fieldChange.from.toDate.diff(triggerIssue.fieldChange.to.toDate).days)}}
And here's a screenshot of the rule:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Yordan Yordanov
Welcome to the Atlassian community.
Since the original author of this Question has already accepted the answer, please start a new Question of your own to get help with your scenario. Starting a new Question will also make your request visible to more of the community. When you add to an existing Question the only people who will see that are the original author, anybody who has already responded, and anybody who is Watching the Question.
In you new Question include a link to this original Question to help community members understand your starting point.
Please also include the output for the rule execution from the Audit Log.
I also advice you to make liberal use of the Log Action in your rule to print the actual values of your fields and each smart value you are trying to use to validate that they contain the values you expect.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! I changed it so that I'm only using the due date based on your point above. Here's what I got:
For Due Date, I put in:
{{issue.duedate.plusDays (fieldChange.from.toDate.diff(fieldChange.to.toDate).days)}}
And that worked!
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.