Issue links are not up to date in a new thread

Hey there,
I have a problem with issue links while executing some functions inside of threads.

I configured 3 post functions within the same transition:

  • Write a comment: The comment shows the count of linked issues (in this case it’s 2)
  • Delete issue links: Delete one issue link
  • Write a comment: The comment shows the count of linked issues (in this case it should be 1)

We want to introduce some performance settings to define how long a post function could run. To realize this, we run the logic of the post function inside of a thread and stop the thread if the timeout is reached. In this case, we throw an exception. If the timeout settings are disabled, the function is executed without a thread.

This is the problem:
If you execute the configured transition without the thread (timeout disabled), the post function works fine and the comments show the correct count of linked issues.

If you execute the transition within a thread, it shows:

  • Comment from first post functions: “2”
  • Comment from third post function (after breaking links): “2”

After checking the issue, the link is deleted, so the count is 1 and not 2.


So it looks like, the thread is not able to access the currently changed issue from the previous post function within the same transition.

Is there a solution to fix this?

(This problem exists only with issue links. With other fields like the description it works)

Cheers,
Marcel