-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: Mindville - Pre Bundled
-
Component/s: Assets - Core experiences
-
4
-
Severity 2 - Major
-
0
Issue Summary
Insight post-function to increase object attribute value does not work as expected due to a race condition.
In particular, if the object attribute value gets increased at roughly the same time on different tickets' transition:
- The first transition will execute the post-function and increase the value
- At roughly the same time, the second transition will execute the post-function and consider old values, and not the new ones made by the first transition.
- This is reproducible only if we are triggering transitions from two different Jira nodes in DC environment.
Steps to Reproduce
- Create a new object type (in this example, it's called Sequences)
- Inside this object type, add two new Integer-type attributes (in this example, we will call them Code 1 and Code 2)
- Create an object of Sequences object type. Assign some integer values to Code 1 and Code 2 fields
- Create Insight field that will contain the object reference. Configure the field as follows (here, the field is called Sequence):

- Inside a workflow editor > go to some specific transition > add the following post-functions that will:
- Publish the workflow
- Create an issue inside of a project associated with the published workflow > edit Sequence field and select the object from step 3
- Create another issue inside of a project associated with the published workflow > edit Sequence field and select the object from step
- In a browser window, on node 1, on the 1st ticket, perform the transition that would call the post-functions and increment the Insight object attribute values
- At roughly the same same time, in another browser connected to Jira on node 2, on the 2nd ticket, perform the transition that would call the post-functions and increment the Insight object attribute values.
Expected Results
The 2nd transition increments the new Insight attribute values that were saved by the first transition:
![]()
Actual Results
There is some kind of race condition that happens if the Insight attributes values are increased at roughly the same time, from two different nodes. The 2nd transition will not take newly incremented values, but it will increase the original values as the 1st transition:
![]()
Workaround
Whenever multiple Insight PFs are set in the same transition, and trying to update the same object, you may face this race condition.
As a workaround, you may have a Groovy Condition to the 3rd 4th and consecutive PFs, to delay its execution:
sleep(n); return true
where n is a value in ms, and should be adjusted (trial and error);
e.g. for the 3rd PF set n=300 and for the 4th, set n=600.
This will result in the 3rd PF executed with a 300ms delay, hence allowing the 1st and 2nd PFs to complete before executing.
Notes
- This issue is only reproducible on Jira DC environment, that contains at least 2 nodes.
- The first and the second concurrent transition must be executed on different Jira nodes!
- links to
- mentioned in
-
Page Loading...