Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Abstract

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

Logic

Access the date and add the number of days to it.

Snippet 

{{ <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

{{ issue.fields.created | dateadd(5,"d") }}
{{ issue.fields.duedate | dateadd(3,"d") }}


Context

The output of this code is a Moment.js date object which you could use:

  • To set a Date/Date-time picker field 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
  • To include the Date/Date-time picker 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
    • Unlink issues

Use cases

A typical use case would be to set the Due date of the issue to issue created plus 5 days - Set the due date to issue created plus five days

Reference

Filter by label

There are no items with the selected labels at this time.

  • No labels