Versions Compared

Key

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

Abstract

This code snippet adds a certain number of days to a Date field.

...

Code Block
languagejs
linenumberstrue
{{ <Date field> | dateadd(<Number of days>,"d") }}

Placeholders

PlaceholderDescriptionExample
<Date Object>Access a date fieldissue.fields.created
<Number of days>
The number of days to be added5

Examples

Context

The output of this snippet is a Timestamp which you can use to

...

Code Block
{{ issue.fields.created | dateadd(5,"d") }}


Code Block
{{ issue.fields.duedate | dateadd(3,"d") }}


Context

You would typically use this code:

  • To set a Date/Timestamp field in 
    • one of the Set Field Value post-functions
    • one of the Transition issue post-functions
    • in the Create issue post-function under Set fields of new issue section
  • To include the Date/Timestamp in the
    • Comment in one of the Comment issue post-functions
    • Subject/HTML body/Text body of Email issue post-function
    • JQL search expression of Link issues current to issue
  • In a conditional execution script to
    • Run a post-function on comparing two Timestamps
    • Unlink issues based on a date comparison

Use cases

...

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

...