Abstract
This code snippet concatenates two text fields ignoring null values
Logic
Access the text fields and concatenate them
Snippet
Code Block | ||||
---|---|---|---|---|
| ||||
textutils.noNull(<First text field>) + "<Delimiter>" + textutils.noNull(<Second text field>) |
Placeholders
Placeholder | Description | Example |
---|---|---|
<First text field> | Accessing the first text field | issue.get("description") |
"<Delimiter>" | Delimiter separating the text fields | "\n" |
<Second text field> | Accessing the second text field | issue.get("summary") |
Examples
The output of this code is a String which you could, for example use in:
...
- Include the key and description while notifying the customer when their issue has been resolved:
- Comment in one of the Comment issue post-functions
Subject/HTML body/Text body of Email issue post-function
Code Block language js linenumbers true Your issue <%=textutils.noNull(issue.getKey())%> - <%=textutils.noNull(issue.get("description")) %> has been resolved.
References
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...