Structure not syncing when issue updating from job script

aviv_eldad
Contributor
November 14, 2022

Hi!

I wrote a job script in script runner that update a custom field on specific issue. when the script is running, the issue is being updated, but the structure that contain the issue doesn't (only after the cache of the structure is cleared).

I've searched on the web and found this link

but it didn't help me much (I tried the suggested option, including in the suggested thread, and it did nothing).

When the script is running, the history of the issue isn't updating. 

So my question is: How to sync the structure with the issue, with the job script?

Thank you for your help!

1 answer

0 votes
David Niro
Atlassian Partner
November 14, 2022

Hello @aviv_eldad ,

Do I understand correctly that you have tried the options listed below, but the history is still not reflecting the change?

If there's no update on the Issue History, our suggestion is to change the script to use either one of these options:

  • initiate issue event manually using IssueEventManager
  • use IssueManager.updateIssue() with corresponding event dispatch option to update the field.

If I have it right, you may want to reach out to Adaptavist's support team here.

Structure is listening for these events in order to prompt a refresh.  Otherwise the previous values will remain until a cache clear (as you have noticed)

I hope this helps.

Best,
David

aviv_eldad
Contributor
November 14, 2022

Hi @David Niro , thank you for the quick response!

I've tried the solutions, but it did not worked out for me. when I tried the updateIssue() function' I got an error (maybe I didn't put the right parameters? I've searched in the documentation and didn't understand it to the end )

Anyway, I will reach out to the support.

Thank you!

Aviv

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events