Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 60 Next »

JSU for Jira Server/Data Center

This is the documentation of JSU for Jira Server/Data Center. If you are using JSU on Jira Cloud, you can find the documentation here.


The 'Create a Linked Issue' feature is available from JSU 2.0


Description

This post function will create a new issue. The new issue will be linked to the origin issue (the one, which triggered the 'Create a Linked Issue' post function).

Any number of fields can be copied to the new issue and within the origin issue.

See the Testing and Fixing Bugs use case for an example how several of our customers are using this post function. The video on that page shows you the following sample configuration in action.


Configuration

Create Linked Issue is a very powerful post functions. It has several sections for its configuration. See also further down.

Precondition

There are several ways in which preconditions can be evaluated in the context of a post function:

  • Ignore precondition (By default every precondition is ignored which means that the post function will be always performed)

  • True (Precondition must be true to execute a post function)

  • False (Precondition must be false to execute a post function)

Learn more in Workflow preconditions.


The configuration then has several sections, as describe in the following sub chapters:

Function Execution Control

Here the idea is, that you have a checkbox custom field on the transition screen, so the user can control some of the functionality.

For example a checkbox 'Create Bug?' might be configured as 'Custom Field that enables linked issue creation'. Only if it is ticked, a new issue will be created.
Typically this checkbox custom fields won't appear in the normal screen of the issue. Also at the end you might set them back to the original (default) value (see Copy within the Origin Issue).

Instead of letting the user choose to copy/move the attachments, you can also configure to never/always copy them.


(info) Tip: You might choose 'Move Attachments added during Transition'. The user then adds some attachments on the transition screen of the origin issue. However since they are moved to the newly created issue, it feels as if he added the attachments to the new issue. 

If you use 'Move Attachments added during Transition' it is important that the 'Create Linked Issue' Post-Function is before JIRA Post-Function 'Update change history for an issue and store the issue in the database'!

Due to a Bug in Jira JRASERVER-65939, 'Copy or Move Attachments' functionality, which are added through a Transition Screen, does not work in Jira 7.5.x & 7.6.0. If you require this functionality, please upgrade to minimum Jira Version 7.6.1!



Initial Mandatory Values for the new Issue

Here you must configure some always mandatory fields for an issue. These are some real basic field of JIRA. Be aware that your JIRA configuration might have additional required fields (you should set them with Copy from the Origin Issue to the New Issue .


Additionally the summary will always be copied from the origin issue to the new issue. The reporter of the new issue will always be set to the user who triggered the current transition (and thus this post function). However you might overwrite them again later with Copy from the Origin Issue to the New Issue

Target Project

Target Project can be set to:

Inside same project

A new issue will be created in this same project

Project variables

If you use the workflow with the 'Create a Linked Issue' post function in several JIRA projects, you might choose  'Project variables'. You then can configure in each of those JIRA project a different target project for the newly created issues. For more about project variables see Project Variables.

The format for those project variables is as follows:

createLinkedIssueTargetProjectKey.<Workflow Name>.<Workflow Transition Nummer>=<Projekt Key>

Workflow Name and Workflow Transition Number are optional.

Example

From project A, you might create new linked issues in project X. But from project B, you might create new linked issues in project Y. But both use the same workflow.

Project Variable in project A: createLinkedIssueTargetProjectKey=X
Project Variable in project B: createLinkedIssueTargetProjectKey=Y

(info) The new issue will be created with the same user, who triggered the transition on the origin issue. If that user does not has the necessary permissions in the target project he will get an error. Also if some validators prevent the creation of the new issue.

Selected Project


A new issue will be created in the selected project


Defined by custom field selection


A new issue will be created in a project which is defined in selected custom field. Here available are fields of types: single select, radio buttons, project pickers

Example

An administrator can create a field "Destination Project" with several different values which will represent project key (only capital letters) or project name (capital and small letters are supported) 

Create new Issue as User

If you don't specify anything here, the create operation will be performed under the same user, who triggered this post function on the origin issue. Thus that user must have the necessary permissions to create the new issue.

However, in some restrictive setup that user might not be allowed to create new issues in the target project. He might not even see the target project!

With 'Create new Issue as User' you can specify a different user account which owns the necessary permissions. Usually this user account is assumed to be only technical, with broad permissions, but not used to log into Jira by in life persons.

This Issue will be related via

Since JSU 2.1.0 the Create a Linked Issue post function allows you the create new issues, which are connected not only with an issue link, but instead also in a parent / sub-task, as well as epic / issue in epic relation.

See Related Issues for more explanation on this topic (especially for creating sub-tasks).

Issue Type

Issue type can be set to:

Selected issue type

A new issue type will have a particular issue type.

Be aware, that the issue type you configure here must be available in the target project.

Defined by custom field selection

Similar to Target Project an issue type can be defined by value selected by user in a dedicated custom field.

Be aware, that the issue type you provide in this custom field must be available in the target project.


The user will be able to select which issue type should be created.
As Jira administrator you also have to create this custom field (in the sample screenshots: Destination Issue Type). Take care of correct values of this custom field. These values have to match with the issue types available in the target project.



Copy from the Origin Issue to the New Issue

(info) Be aware, that all destination fields must also be on the create issue screen of the new issue.

When configuring your post function, you can copy the value from a source field to a destination field. Click the + Add button to add additional field pairs to your configuration.

Note that not all conversions from source to destination field are supported, nor feasible. We can only ensure that it will work if the source and destination fields are of the same field type, or if the destination field is a text field. Some additional combinations of different field types might work as well, however, they are not 'officially' supported.

Overwrite / Append / Prepend

For text fields and some fields that can take multiple values (e.g. checkboxes), you can choose to overwrite, append or prepend the new value to any existing value. In the case of a text field, you can also choose a separator that will be placed between the values.

Create version if necessary

If your origin issue has a version, it can be copied to the linked issue.

If the destination field is 'Fix Version/s', 'Affects Version/s' or a custom field of type 'Version Picker', you can choose to create a new version in the target project, if it does not yet exist. If you don't select this option and that version does not yet exist, an error message will be displayed to users and the transition won't complete.

The new version will be created even if the user does not have the 'Administer Projects' permission. (Normally a user needs that permission to be able to create a new version.)

Special 'Sources'

  • *** default value ***: The default value of the destination field will be set.

  • *** empty ***: The destination field will be set with the empty string value. When overwriting a field value, the resulting destination value will be null. When appending/prepending a field value, the resulting destination value will be the concatenation of the existing field value (if any) and the separator. If the aim is to clear the destination field value, then use the JSU "Set Any Field Value" or "Clear Field Value" post functions. (See: Post-Function Concatenation Operations)

  • *** transition comment ***: The comment, which the user entered on the transition screen.

  • *** last comment ***: The last (most recent) comment on the issue before the transition was started.

Special 'Destinations'

  • *** new comment ***: Create a new comment with the value from the source field.


Real life tips

(info) Tip: You might setup a special transition screen to mainly copy those fields to the newly created issue. So it feels more like it would be the create screen of the new issue. In that case, you won't show those fields on the origin issue, but reset them again afterwards (just empty or back to the default value), see Copy within the Origin Issue.

For 'Copy from the Origin Issue to the New Issue' append & prepend do only make sense, if the target field contains already a default value. So in practice append or prepend are more often used for 'Copy within the Origin Issue'. If at all.


Copy within the Origin Issue

When configuring your post function, you can copy the value from a source field to a destination field. Click the + Add button to add additional field pairs to your configuration.

Note that not all conversions from source to destination field are supported, nor feasible. We can only ensure that it will work if the source and destination fields are of the same field type, or if the destination field is a text field. Some additional combinations of different field types might work as well, however, they are not 'officially' supported.

Overwrite / Append / Prepend

For text fields and some fields that can take multiple values (e.g. checkboxes), you can choose to overwrite, append or prepend the new value to any existing value. In the case of a text field, you can also choose a separator that will be placed between the values.

Create version if necessary

If your origin issue has a version, it can be copied to the linked issue.

If the destination field is 'Fix Version/s', 'Affects Version/s' or a custom field of type 'Version Picker', you can choose to create a new version in the target project, if it does not yet exist. If you don't select this option and that version does not yet exist, an error message will be displayed to users and the transition won't complete.

The new version will be created even if the user does not have the 'Administer Projects' permission. (Normally a user needs that permission to be able to create a new version.)

Special 'Sources'

  • *** default value ***: The default value of the destination field will be set.

  • *** empty ***: The destination field will be set with the empty string value. When overwriting a field value, the resulting destination value will be null. When appending/prepending a field value, the resulting destination value will be the concatenation of the existing field value (if any) and the separator. If the aim is to clear the destination field value, then use the JSU "Set Any Field Value" or "Clear Field Value" post functions. (See: Post-Function Concatenation Operations)

  • *** transition comment ***: The comment, which the user entered on the transition screen.

  • *** last comment ***: The last (most recent) comment on the issue before the transition was started.

Special 'Destinations'

  • *** new comment ***: Create a new comment with the value from the source field.

Position of the Post Function

(warning) You can use this post function in the create transition (transition leading to Status "Open"), but you have to make sure to position the post function after "Creates the issue originally" and before "Re-index an issue to keep indexes in sync with database.". As the create transition behaves differently than other transition, the copying and/or moving attachment and copy field within same issue functionalities are not available in this case.

In any case, if you use 'Move Attachment' (see bellow) you must position the post function before 'Update change history for an issue and store the issue in the database.'

You can add this post function several times in one transition.

Example

See the Use Case Testing and Fixing Bugs for a nice example, how several of our customers use it. The video on that page shows you the following sample configuration in action.


Supported Field Types

JSU supports many different field types such as system fields and custom fields. However you should be aware, that not all field types are supported, and not in all combinations. We aim to cover the most important field types and are continuously adding and improving how different field types are supported. Some custom fields of other third-party apps might never be supported.

For that reason, you should always test anything you do with the JSU app with fields. You can try it with a free 30-day evaluation license.


  • No labels