Abstract
This code snippet assigns the issue to a specific user if the issue is unassigned.fetches the next unreleased version available for the current issue
Logic
Check for a value on the Assignee and based on the result, assign the issue to a specific userAccess the available versions for the issue and filter the next unreleased version by the version date
Snippet
Code Block | ||||
---|---|---|---|---|
| ||||
{% set vers = {} %} {% for v in issue | projectInfo | field("versions") %} {% if issue.fields.assignee not v.released and (not vers.releaseDate or vers.releaseDate >= v.releaseDate) %} {{ <Application User Object or{% Stringset representingvers a= Username>v %}} {% endif %} |
Placeholders
...
Placeholder
...
Description
...
Example
...
{% endfor %}
{{vers.name}} |
Placeholders
N/A
Examples
The output of this snippet code is an ApplicationUser
or a String representing a username which Version which you can use to set a field of User type in Set field value and Set field value of linked issues post-function.
Use cases
...
could use in a template, for example, to set a Version picker field in:
- one of the Set Field Value post-functions
- one of the Transition issue post-functions on the transition screen, if any
- the Create issue post-function under Set fields of new issue section
References
- How to insert information using Nunjucks annotations
- Accessing user created custom fields
- Accessing JIRA Standard fields
- field filter
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...