Versions Compared

Key

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

...

This page provides Groovy script examples to interact with Asset asset custom fields and Jira issues within your Jira workflows. These scripts can be used in post functions to update Asset asset attributes based on Jira issue transitions.

Tip

You can directly use issue or originalIssue of the transition, or fetch an issue by key or ID with Issue Manager (like anotherIssue in examples). return statements are optional but it makes the script more readable.

On this page:

Table of Contents
minLevel1
maxLevel6
outlinefalse
styledefault
typelist
printabletrue

...

If you want to assign a date or dateTime asset attribute, the value must be in ISO time format (for example, 2018-11-06T10:24:37.513).

  • For Date-Time fields, second and rest of the value will be purged automatically. Result example: 2018-11-06T10:24.

  • For date fields, minute and rest of the value will be  purged automatically. Result example: 2018-11-06.

...

If you want to assign a date or dateTime asset attribute, the value must be in ISO time format (for example, 2018-11-06T10:24:37.513).

  • For Date-Time fields, second and rest of the value will be purged automatically. Result example: 2018-11-06T10:24.

  • For date fields, minute and the rest of the value will be  purged be purged automatically. Result example: 2018-11-06.

...

If you want to assign a date or dateTime asset attribute, the value must be in ISO time format (for example, 2018-11-06T10:24:37.513).

  • For Date-Time fields, second and the rest of the value will be purged automatically. Result example: 2018-11-06T10:24.

  • For date fields, minute and the rest of the value will be  purged be purged automatically. Result example: 2018-11-06.

...