Subracting Custom Number Field from Custom Date Field to Get Due Date

Amber McMahon June 20, 2024

Hi All, 

I have looked everywhere and i feel like i have tried everything to do this.

Tickets for this project (which is a Team Managed Project) will need to be due x days from live date. We need these dates to change if the live dates change. 

I have two Custom Fields:

Custom Number Field (customfield_10368)

Custom Date Field (customfield_10367)

I have tried to do and advanced edit of the due date field using this:

{ "fields": {

"duedate": "{{ issue.customfield_10367.format("yyyy-MM-dd").minusDays(5).jqlDate}}" } }

I have tried multiple variations of JQLDate or Medium Date or whatever and they all give me this error:

(The duedate must be of the format "yyyy-MM-dd" (duedate))

Eventually i do want to get the custom field to subtract the days but i cant even get this to work first.

If i do a simple edit and just to edit Due Date with this:

{{issue.customfield_10367.minusDays(issue.customfield_10368)}}

It says successful but all it does is clear out the Due Date. 

Any thoughts on how to get this to work?

2 answers

1 accepted

3 votes
Answer accepted
Amber McMahon June 20, 2024

For some reason the second option finally started working when it wasn't before. Not entirely sure what happened. But wanted to let anyone know in case they are searching for this:

{{issue.customfield_10367.minusDays(issue.customfield_10368)}}


1 vote
Amber McMahon June 20, 2024

Apparently that only works on Epics, it does not work on tasks or subtasks? Marking it as Trigger.issue also does not fix it. So i guess i still have this question as to why its not working?

Suggest an answer

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

Atlassian Community Events