-
Bug
-
Resolution: Timed out
-
Low
-
None
-
7.10.1
-
7.1
-
2
-
Severity 3 - Minor
-
0
-
Summary
Jira's Java API for issue create and issue edit executes code that is database transaction unfriendly. This code is about setting label custom field values. During this operation we reset cache storing label values and expect the new ones to be already present in database for loading. Any other thread that will access the cache for created/edited issue during the transaction will load the data without uncommitted part.
Steps to reproduce
Steps to reproduce include 3rd party apps that show example of Jira API usage that causes the problem. If you are aware of this behaviour causing problem in Jira without 3rd party apps please let us know in issue comment.
- Setup Jira 7.10.1
- Install Exocet 2.15.1
- Install Automation for Jira 3.13.10
- Setup 2 projects: "Project A" and "Project B"
- Setup a custom field of type "Labels" globally
- Configure Exocet field mappings to copy this "Labels" custom field:
- Go to "Administration" -> "Add-ons" -> "Exocet" -> "Configuration"
- Switch tab to "Fields mapping".
- Click "+Add" button.
- Set "Name" field and add "Field to field" for copying "Labels" custom field created earlier.
- Click "Save" button.
- Configure an Exocet operation to create a new issue in "Project B":
- Go to "Administration" -> "Add-ons" -> "Exocet" -> "Configuration"
- In tab "Operations" click "+Add" button.
- Set "Name" field
- In tab "Target" of "Create a operation":
- Set "Project" to "Project B".
- Set "Issue type" and "Link" fields to any available option.
- Set "Fields mapping" to one created earlier.
- Add configured Exocet operation as a post-function in any workflow transition for "Project A"
- Configure an Automation for Jira rule triggered by an issue event:
- Go to "Administration" -> "System" -> "Automation for Jira" -> "Automation rules"
- Click "Create rule" button.
- As a trigger pick "Issue commented"
- Select "New action" -> "Log action".
- Type anything into "Log message" and click "Save" button.
- Set anything in "Name your automation..." field and click "Turn it on".
- Create issue "Issue A" in "Project A" with values in "Labels" custom field.
- Transition "Issue A" in "Project A" using the transition you added the Exocet post-function to.
Expected result
A new issue is created in "Project B" with all of labels from copied issue.
Actual result
A new issue is created in "Project B", however the labels custom field appears to not have any values.
- relates to
-
JRASERVER-40597 Issue events fired from a workflow transition should happen after the transaction is committed
- Closed
-
JRASERVER-34376 Issues not committed to database (and cannot be fetched) at time of event dispatch for issues created from post function
- Gathering Impact