Hi,
I am trying to update the "End Date" of an issue using Jira Automation.
What I want is to use the fact that all my issues have a start date, and when I estimate a given issue and provide an "Original Estimate", I then want to extract the value in that field, add the relevant number of days and set the "End Date" of the issue based on this.
As I am using a plugin (BigGantt) my Start and End dates are in a separate custom field, which I have confirmed are "Date" fields (unsing the /editmeta service).
I have verified that this function gives me the information I want, in this case "1", for 1 day:
issue.timetracking.originalEstimate.remove("d")
I have also verified that I can set the date field of the end date using this function:
"customfield_10034" : "{{issue.customfield_10015.plusDays(1).jiraDate}}}"
Now I simply replace the 1 with my second statement, with the function from my first statement. However, this doesn't work, I get an invalid JSON error.
{
"fields": {
"customfield_10034" : "{{issue.customfield_10015.plusDays(issue.timetracking.originalEstimate.remove("d")).jiraDate}}}"
}
}My best guess is that this is a type conversion issue, as the 1 in the first statement is a string, and the input required for the second statement is an int.
I have not been able to find parseInt (or similar) function.
Any ideas what's going on here, or how to achieve the initial objective?