Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Automation Rule to add due date to issue from text date in description

We have tickets coming through to our Jira Service Management from another system that sends us a date value in plain text. I'd like to create an automation to scrape that value and set the due date of the ticket to that date.

So far in my automation I've created a variable called StartDate with the smart value of {{issue.description.match("Start Date:\s(.*)")}}.

In the description of the ticket I have 

Start Date: 08/11/2022

For the purpose of debugging I have the automation add an internal comment to display the Smart Value which displays as 08/11/2022 which is correct but doesn't work when I try to update the Due Date to that.

In order to get that into the due date field I'm aware that I need to convert that Smart Value into an actual date that Jira understands but that is where I've got myself stuck, having tried to follow through instructions on to convert the text to a date the value is always blank and I don't know what I'm doing wrong.

Any help / guidance greatly appreciated!!

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.
Aug 11, 2022

Hi Marc - Welcome to the Atlassian Community!

I would probably try to stick the value into a single line text field instead of comments since those can be one to many and harder to deal with. Then the text convert might (hopefully) will be easier.

Can you try that and see what it does? You can just use the Summary field as a test if you want. And this code then for the date field update: 

{{issue.summary.toDate("yyyy MM dd")}}

Or whatever your format for dates is. 

And if that doesn't work, can you share your rule along with the audit log so we can see any error messages? 

Hi John, Thanks for the welcome!

Just found the time to get back to this. Thanks for you answer and apologies I didn't explain clearly that the comment is just for debugging to see what value has been scraped by the variables I've created.

The automation goes like this: First part is a variable to scrape the date out of the description.  Screenshot 2022-08-19 at 12.10.13.png

This bit works fine and I do get exactly what I am expecting.

The next part of the automation creates another variable which I was hoping would be the date in a converted form, however, this value doesn't ever generate and the audit log doesn't show any error.

Screenshot 2022-08-19 at 12.16.42.png

What I was wanting to do next is to take the newJoinerStartDate value created in the step above and edit the Due Date of the ticket.

Screenshot 2022-08-19 at 13.04.04.png

This doesn't work as the value for newJoinerStartDate is blank.  

The final part of the automation and the element that will be removed is to update the ticket with a comment showing me what values were created for each of the variables.

Screenshot 2022-08-19 at 13.06.11.pngThis updates my ticket to show this:

Screenshot 2022-08-19 at 13.06.56.pngThe initial value that is scraped from the ticket description is there and is correct, the problem seems to be when I try to convert that into a valid date format that the Due Date field will accept, sadly the audit log for this shows no errors which doesn't help direct me anywhere. 

Screenshot 2022-08-19 at 13.08.57.png


Any ideas / suggestions would be ace!

No ideas or suggestions, sorry - came here to say I am stuck at this point too.

Have tried multiple date formats using .toDate, .format, .jiraDate - none of which seem to work unfortunately!

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events