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!


Automation to set due date automatically not working, could use help

I'm trying to automatically set an issue's due date based on the following:

1. If the value of custom field "Departure Date" is more than 3 days away, then set the due date to now.plusDays(3) - since it can wait a little.

2. If the Departure Date is within 3 days from now, make the due date right now (because we gotta do stuff immediately).

I have scriptrunner but I'm new with it, so I'm trying to use Automation. I have an If statement checking JQL and that part seems to work, but its erroring out saying the Due date field may be unavailable for the project/type. I've checked in screens and in my field configuration and Due date is definitely in both, so not sure what to try now.


I've tried setting Due date as {{now}}, {{now.plusDays(3).abs}}, {{now.plusDays(3).format("MM/dd/yyyy")}} etc with no luck. 

2 answers

1 accepted

0 votes
Answer accepted

Figured out I had shot myself in the foot and accidentally blocked Automation for Jira's edit rights, so it just couldn't write the field. Once I re-added permissions for Automation for Jira then everything worked. Whoopsies.

0 votes
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 04, 2023

Hi @Mike Prill , thanks for your question.

First, I always recommend that people take a look at the Automation library provided by Atlassian here -Jira automation template library | Atlassian. This is a great place to see some worked examples of what is possible.

If you search the word 'date'. you can see there are some rules here which might give you some ideas -


I have some questions for you now. This issue, FLRT-24, for which criteria should it be triggering the automation? The feedback that the automation has given is that the issue doesn't match the JQL. Have you tried just pasting the query into the filter results to see how many issues meet the criteria?


Next, I would advise to break that JQL query down and run more tests to see up until what point the rule still runs without an error. You can also try putting a log action into the rule to return the results, for example, of the 'Departure Date' so you can see against which criteria the action should be called.

I hope this gives you some ideas of what to try next. If you need more help, please write us here.


Hi @Valerie Knapp 

The jql does show me the correct items when I use it as a filter. I've tried simple and complex jql but the error still surrounds the due date field. 

Here's an example of much easier jql but the same due date field issue:

simple Due date error.pngsimple Due date error 2.png

I'm just using " {{now.plusDays(4)}} " as the action, which I see in several examples.

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events