Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Set Due Date in Jira Automation Based on Custom Field with "#d" Format (string)

Zeroocool October 8, 2025

Problem

I needed to automatically set the Due Date field in Jira Service Management based on a custom text field that contains values like "1d", "5d", etc. The automation kept failing with "Fields ignored: Due date (duedate)" or setting the date to null.

 

Solution

Action 1: Create Variable

- Variable name: daysToAdd

- Smart value: {{issue.customfield_XXXXX}}

- Replace customfield_XXXXX with your actual field ID

 

Action 2: Edit Work Item

- Due date: {{now.plusBusinessDays(daysToAdd.asNumber)}}

 

Create Variable first - Direct field reference in plusBusinessDays() doesn't work

❌ {{now.plusBusinessDays(issue.customfield_XXXXX.asNumber)}} - Direct field reference fails

Use .asNumber - Variables are stored as strings, must convert to number

(In this case 1d converted into '1.0' when testing output in comments)'

 

 

 

Hope this helps others struggling with the same issue!

2 answers

0 votes
Tomislav Tobijas
Community Champion
October 9, 2025

Hi @Zeroocool ,

There's a know bug related to this: AUTO-957: {{[date].plus[Unit]([number])}} smart value doesn't recognize variables in Automation 
You could check the workaround section and the comments area for some additional insights on the topic. 👀

*btw, I've moved this question to JSM app forum group

Cheers,
Tobi

0 votes
arielei
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.
October 8, 2025

Hello @Zeroocool 

Please see here:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/

 

You can set the variable with surrounding {{#=}} and ending {{/}} - it tells the system to consider this as numbers.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events