Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

Abstract

This code snippet sets an Estimate field to the difference of two specific dates of the issue. 

Logic

Access the date fields of the issue and return their difference

Snippet 

Code Block
languagejs
linenumberstrue
{{ <Date object> | date('diff',<Second date>,'days') }}d

Placeholders

PlaceholderDescriptionExample
<Date Object>
Value of the first date fieldissue.fields.updated
<Second Date object>
Value of the second date fieldissue.fields.created

Examples

The output of this snippet is a String representing a duration which you could use to Set an estimate field. Eg: Set the Original estimate of the issue to the difference of the issue creation and Due date in

  • one of the Set Field Value post-functions
  • one of the Transition issue post-functions on the transition screen, if any
  • in the Create issue post-function under Set fields of new issue section

References

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "jmwe-nunjucks" and type = "page" and space = "KB"
labelsjmwe-nunjucks jmwe-cloud

...