...
...
...
...
...
...
...
...
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 | ||||
---|---|---|---|---|
| ||||
{% if issue.fields.assignee.nameset vers == null{} %} {{% <Applicationfor Userv Objectin orissue a| StringprojectInfo representing a Username> }} {% endif %} |
Placeholders
...
Placeholder
...
Description
...
Example
...
You need to select "Treat as JSON" option when the script returns a user object
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
{% if issue.fields.assignee.name == null %}
{{ issue.fields.reporter.name }}
{% endif %} |
Code Block | ||||
---|---|---|---|---|
| ||||
{% if issue.fields.assignee.name == null %}
{{ issue.fields.project.lead }}
{% endif %} |
You need to select "Treat as JSON" option
...
| field("versions") %}
{% if not v.released and (not vers.releaseDate or vers.releaseDate >= v.releaseDate) %}
{% set vers = v %}
{% endif %}
{% endfor %}
{{vers.name}} |
Placeholders
N/A
Examples
The output of this code is either a ApplicationUser object or a String representing a username.
When it returns a ApplicationUser object, you would use this code:
...
Version which you 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
Use cases
A typical use case would be to assign the issue to the Project lead if it is unassigned - Assign the issue to the Project lead, if the issue is unassigned on creation
...
References
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...