I am trying to calculate a "Days in [Status]" field in Jira Product Discovery and can't seem to get an output for my formula.
I want to reference a custom date field that indicates the beginning of a project status and re-calculate the days in status on a daily basis with Jira Automation. I've been debugging and checking other posts in the community but have still not been able to solve this.
Here's what I have in debug now:
Now is: {{now.jiraDate}} and Discovery Kickoff is {{issue.customfield_10239.match(".*start.*([0-9]{4}-[0-9]+-[0-9]+)")}}This works as expected and outputs:
Now is: 2024-10-07 and Discovery Kickoff is 2024-09-03
However, the next line I have for debugging fails:
Date Diff is: {{now.JiraDate.diff(issue.customfield_10239.match(".*start.*([0-9]{4}-[0-9]+-[0-9]+)")).days.abs}}Returns this:
Date Diff is:
I've tried every formatting combination I'm familiar with and I cannot get this formula to give me a number of days since the Discovery Kickoff date. Any help is hugely appreciated!