You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am trying to update the "Due date" field within a created issue. The created issues are for the review of our Vendors. We have an object type called "Vendors" where all Vendors are stored. The created issue's "Due date" should be based off of the "Next Performance Review Date" attribute stored within each Vendor object.
You can see below, the automation checks our defined criticality of the vendor and depending on the criticality and the next performance review date, the due date is determined. To me the smart value makes sense, but every-time I run the automation it completes successfully but the due date is not updated within the issue.
Hi @Haig Aboyan ,
can you share the details of the audit log of the automation rule execution ?
Also, to help debugging, you can add a "Log Action" action component to your automation rule. If you add the smart value there, the result of your date calculation will be added to the audit log. Like this, you can check what date is calculated.
Best regards,
Kris
Hi Kris,
When I "Log Action" and use the following smart value {{lookupObjects.Next Performance Review Date}}, the correct value is populated. However, if I try to change the smart value to {{lookupObjects.Next Performance Review Date.plusDays(274)}}, the value is blank. The same result is reflected in the automation log:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Haig Aboyan ,
The problem is caused by the different date formats used by your asset object and Jira.
When you retrieve your "Next Performance Review Date" from your vendor object, the date format is 22/Feb/23. Unfortunately, this date format does not allow you to perform date calculations on it. That is why your automation rule fails.
I found a solution in this community article: https://community.atlassian.com/t5/Jira-articles/Jira-automation-and-Insight-Acquiring-an-insight-date-attribute/ba-p/2111333. This article explains how you can convert the asset date format to a Jira date format using a regex.
In your automation rule you need to:
1. Put the object date into a Variable
2. Next, you can use the regex mentioned in the article to convert the variable date to a "2023-02-22" Jira date format. In the same step, you can add a number of days to this date and set this value as the due date. To do this, you add a 'Edit Issue' component to your workflow, and set 'Due Date' to this smart value
{{NextDate.match("((\d{2})\/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\/(\d{2}))$").toDate.plusDays(274)}}
Hope this works,
Best regards,
Kris
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.