This code snippet sets an Estimate field to the difference of two specific dates of the issue.
Access the date fields of the issue and return their difference
if(<Date object>) { return <Date Object> - <Second Date object> + "d" } |
Placeholder | Description | Example |
---|---|---|
<Date Object> | Value of the first date field |
|
<Second Date object> | Value of the second date field |
|
The output of this snippet is a String representing a duration which you could use in a Groovy expression, for example to - Set an estimate field. Eg: Set the Original estimate of the issue to the difference of the issue creation and Due date in
the Create issue post-function under Set fields of new issue section
if(issue.get("duedate")) { return (issue.get("duedate") - issue.get("created")) + "d" } |
|