Skip to main content
Skip table of contents

Elements Connect post functions


Post functions

Elements Connect extends Jira workflows capabilities with 4 post functions.



This page explains how to configure them.

If you are not familiar with Jira workflows and post function, you should have a look at the related Atlassian documentation.



Set a field value

Usage

This function allows you to select a set of Elements Connect fields whose value(s) will be updated when the transition is executed.

There are two cases, depending whether your field is a single or multiple value field.

Single value Elements Connect field

When run, the post function will update the field with the first available value in the values list. Exactly as if someone would edit the issue and select the first value available for the field.

If there is no available value (the edit query evaluates to empty), then the field is cleared.

Multiple value Elements Connect field

When run, the post function will update the field with all available values in the values list. Exactly as if someone would edit the issue and select all the values proposed for the field. This could have an impact on the performances of your application.

No result

If there is no available value (the edit query evaluates to empty), then the field is cleared.

Configuration



When you add this post function to your workflow transition, you will need to select one or more fields to update.

Field must be configured to be displayed in this list. If a field is not displayed, go check the Elements Connect administration.




Copy field display to another field

Usage

This function allows you to select an Elements Connect Live Text field whose display will be copied to another issue field.

The display value is the formatted value displayed in the issue view.

Source field

Only the Elements Connect fields of type Live text can be used as source of this post function.

Target field

The list of issue fields available as target is limited to the following types :

Field typeAvailable fields
Text fields

Text system fields (summary, description and environment)

Text custom fields (read-only, single and multi line)

Date and date time fields

Due date system field

Date and date time custom fields

User fields

Assignee and reporter system field

User picker custom fields (single and multi)

Number fieldsNumber custom field

Content adaptation

Here is a list of how Elements Connect display is adapted before the target field can be updated:


Field typeWhat is copiedHow is content adaptedMultiple vs. single
Single line text fieldsThe whole Elements Connect display including header and footer


Line breaks are filtered and replaced with coma (,) N/A
Multi line text fieldsThe whole Elements Connect display including header and footerNo adaptationN/A
Date and date time fieldsHeader and footer are ignored. Every display line is adapted


Every display line is tested against Jira date patterns and converted before being inserted.

Values not recognised as Dates are ignored.

If the target is a single field and the display contains many lines, only the first one is taken into account. Additional lines are ignored
User fieldsHeader and footer are ignored. Every display line is adapted


Every display line is matched against available user keys before update. Values that do not correspond to valid users are ignored.Same as above
Number fieldsHeader and footer are ignored. Every display line is adapted

Every display line is parsed to match a number (floating point). 

Values that do no match are ignored.

Spaces in values are ignored.

Same as above


HTML in display

If you have HTML content in your field display, this content will not be converted. This means that copying a HTML content to a text field will result in raw HTML being displayed in the issue.

Configuration

When you add this post function to your workflow transition, you will need to select an Elements Connect Live Text field as source and another issue field as target.



Field must be configured and of type Live Text to be displayed in this list. If a field is not displayed, go check the Elements Connect administration.




Copy field key to another field

Usage

This function allows you to select an Elements Connect Live Text or Live User field whose programmatic content (keys list) will be copied to another issue field.

The key in Elements Connect field is the identifier in the field administration.
For the user field, key is typically a valid username.

Source field

Only the Elements Connect fields of type Live text and Live User can be used as source of this post function.

Target issue field

The list of issue fields available as target is limited to the following types:

Field typeAvailable fields
Text fields

Text system fields (summary, description and environment)

Text custom fields (read-only, single and multi line)

Date and date time fields

Due date system field

Date and date time custom fields

User fields

Assignee and reporter system field

User picker custom fields (single and multi)

Number fieldsNumber custom field
Elements Connect fieldsElements Connect custom field (all types)

Key adaptation

Depending on the type of the source field, the key is adapted to the target field type.

Live text
Target field typeHow is key adaptedMultiple vs. single
Single line text fieldsList of keys are joined with coma (,) N/A
Multi line text fieldsEvery key in the list appear in a separate lineN/A
Date and date time fields

Every key is tested against Jira date patterns and converted before being inserted.

Values not recognised as Dates are ignored.

If the target is a single field and the Elements Connect field contains many keys, only the first one is taken into account. Additional keys are ignored
User fieldsEvery key is matched against available user keys before update. Values that do not correspond to valid users are ignored.Same as above
Number fields

Every key is parsed to match a number (floating point). 

Values that do no match are ignored.

Spaces in values are ignored.

Same as above
Elements Connect fieldsNo adaptation. The keys list is copied to the other Elements Connect fieldN/A
Live User

(warning) Elements Connect Live User field keys should be a valid Jira user names.

Target field typeHow is key adaptedMultiple vs. single
Single line text fieldsList of keys (user names) are joined with coma (,) N/A
Multi line text fieldsEvery key (user name) in the list appear in a separate lineN/A
Date and date time fieldsN/AN/A
User fieldsEvery key (user name) is matched against available user keys before update. Values that do not correspond to valid user name are ignored.If the target is a single user field and the Elements Connect User field contains many users, only the first one is taken into account. Additional users are ignored.
Number fieldsN/AN/A
Elements Connect fieldsN/AN/A

Configuration

When you add this post function to your workflow transition, you will need to select an Elements Connect Live Text or Live User field as source and another issue field as target.



At least one Live Text or Live User field must be configured to be displayed in this list.
If a field is not displayed, go check the Elements Connect administration.




Post the display of a Connect field in a comment

Usage

This function allows you to add a comment to the transitioned issue. The comment content will depend on the selected Elements Connect field.

Configuration

When you add this post function to your workflow transition, you will be proposed the following options:



  • Text above Elements Connect field: Free text concatenated in the comment content before the field. If a text is present in the header, a new line will be appended after it.
  • Connect field to post in Comment: an Elements Connect field which will be evaluated and used as comment content.
  • Text below Elements Connect field: Free text concatenated in the comment content after the field. If a text is present in the footer, a new line will be appended before it.


Your field needs to have a configuration in Elements Connect administration to be displayed in this list. If your field is not displayed, go check the field administration.

Comment content

The final comment content will be obtained by concatenating the header, then the Elements Connect field evaluation, then the footer.

The Elements Connect field is evaluated thanks to the 'Post function comment' display view in Elements Connect field administration:

If this view is not defined, then the standard issue view will be used. Then if the issue view is not defined, the edit display will be used.

The comment accepts wiki markup, so you can use this format for the header, the footer and the post function view.

If the header has a value, a new line will be appended between the header and the field evaluation. In the same way, if the footer has a value, a new line will be appended between the field evaluation and the footer.

Special cases

The field is empty or the view evaluation is empty

When the field evaluates to the empty string, then the comment will still be added using the header and footer defined.

The field view evaluates to more than one line (view query returns many lines)

When the field evaluates to many lines, then every line is added, separated by a new line.

Examples

Mention a user stored in an Elements Connect field

Configuration

CODE
Hello [~{0}]
This issue requires your attention
Regards

Result



Limitations

As these function run in the context of a transition, there are a few things to keep in mind:

Create issue transition

When used in the Create issue transition, Elements Connect post functions must be placed after the Creates the issue originally post function:



Velocity context

The  variables defined in Velocity context can be affected :

  • $userInput  is not available
  • $currentUser and $currentUserLocale will be based on the user running the transition. This is not an issue during normal operation, but this is to be considered when transition are run automatically by a script of an add-on




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.