Versions Compared

Key

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

...

It is possible to concatenate, or string together, one or more source values to an existing field value/s. JSU post functions that support the concatenation of field values include:

...

Common applications

Q) Previously in the “Create Linked Issue (JSU)” post-function, it was possible to append a value to an empty target field by selecting “*** empty ***” as the source field and defining “Text to Insert” as the separator. In the current versionNow, when the target field value is empty, this no longer works.

A) The “Set” as a “Create Linked Issue (JSU)” sub-function was introduced at a later time after “Copy to New”, so some users have been were accustomed to setting an empty target value in this way. While this workaround did work, it would result in the target field value being concatenated with the defined separator whenever the post - function is was executed. As a result, the target field value would perpetually get longer.

If it is the intention is to set an “initial” target field value, then we recommend the recommended following approach is as follows:

  • Set Value to Field on New: Summary to [PREFIX]

  • Copy to New: Summary to Summary , append with separator: with  -

Using this approach, the target field value will not be perpetually concatenated.

Concatenation modes

All the The above-mentioned post functions support the overwrite, append, and, with the exception of the "Update Any Issue Field (JSU)" post function, the prepend concatenation modes. In addition, the "Create Linked Issue (JSU)" post function supports the definition of a separator string when concatenating multiple values to a target text field.

...

  1. Collection Fields (i.e. “Affected Version/s”, “Fixed Version/s”, “Component/s”, “Custom Field Cascading Select”, “Custom Field Multi-Select”, “Custom Field Multi-Checkboxes”, “Custom Field Select”, “Custom Field Radio”).

  2. Single Value Fields (i.e. “Assignee”, “Reporter”, “Summary”, “Description”, “Due Date”, “Custom Field Text”, “Custom Field Multi-line Text”, “Custom Field Number”, “Custom Field Date”, “Custom Field Date/Time”).

A Collection Field is empty if it contains no selection. In this case, a Collection Field will be interpreted as having the value null, when evaluating evaluated as a source field or when saved as a target field.

A Single field Field value either has a value or is set to null. In the case of text field types, the empty/blank string is saved in Jira as the value null. A text field will never be saved with a blank string value.

The

...

pseudo Source Field

...

selector “*** empty ***”

As stated previously, Jira will never save a text Single field value as a blank string. In the “Copy Value From Other Field (JSU)”, “Linked Transition (JSU)”, “Create Linked Issue (JSU)” sub-functions “Copy to New” and “Copy with Origin” configurations, the “*** empty ***” source pseudo-field may be selected, is equivalent to passing an empty string as the source value. This configuration only has relevance when the target field is a text Single field value and is the only possibility to append/prepend a blank string to an existing field value.

Additionally when the “Update Any Issue Field (JSU)” or “Create Linked Issue (JSU)” sub-function “Set” is configured with the concatenation mode append/prepend and the field value is set as blank, it will be interpreted as the same as the “*** empty ***” string source value. When these configurations are defined as having the field value set as blank and the concatenation mode set as “overwrite”, the source value is interpreted as having the value null.

Collection Field

...

concatenation

When a Collection Field is selected as the source of a concatenation operation, the target field type determines how it will be concatenated depends on the target field type:

  1. If the source value is a Collection Field and the target field type is a multi-value Collection Field, then JSU will attempt to concatenate/overwrite the target field values with the source field values if they do not already exist in the target field values. If the resulting concatenated target Collection Field is empty, it will be saved with the null value. In this constellation, or grouping, the configured separator has no relevance, but the concatenation mode will determine whether the original target field values are preserved or not.

  2. If the source field is a Collection Field and the target field type is a single-value Collection Field or a non-text type Single Field then the target field value will be overwritten with the first value of the source Collection Field, or null if the source Collection Field is empty. In this constellation, the configured separator and the concatenation modes have no relevance, since the target field can only contain a single value or null.

  3. If the source field is a Collection Field and the target field is a text type Single Field, then the source field values are converted to a collection of text values (i.e. Component Name, Version Name, Select Label, etc..) and concatenated to a string with the configured separator, before concatenating/overwriting the target text type Single Field with the configured separator. If the source Collection Field is empty, it will be interpreted as having the value null and will not be appended/prepended to any existing target field value. In this constellation, the configured separator and the concatenation modes have significance in the concatenation of source Collection Field values as well as the position of the concatenated values in the resulting target text field value.

Single Value Field

...

concatenation

When a Single Value Field is selected as the source of a concatenation operation, the target field type determines how it will be concatenated depends on the target field type:

  1. If the source field is a Single Field and the target is a non-text Single Field, then JSU will attempt to apply/convert the source field value when setting the target field value. In this constellation the configured separator and the concatenation modes have no relevance, since the target field can only contain a single value or null.

  2. If the source field is a Single Field and the target is a text Single Field, the then JSU will attempt to apply/convert the source field value as a string, before overwriting/concatenating the target text field value with the configured separator string. If the converted source value is null, then it will not be appended/prepended to any existing target field value. In this constellation the configured separator and the concatenation modes have significance in the concatenation of source and target values as well as the position of the concatenated values in the resulting target text field value.

  3. If the source field is a text Single Field and the target is a Collection Field, the source field will be split as a collection on the “,” (comma) delimiter, before attempting to apply/convert the source value/s to the target field value/s. The “delimiter” string is currently non-configurable in any of the JSU post-function configuration options.

Text Single Field

...

target concatenation table

Notes:

Anchor
Concatenation-Table-Notes
Concatenation-Table-Notes

...