JIRA Cloud ScriptRunner - Modifying Issue - UI is not updating

I implemented script which auto-assign task for some user by executing script by ScriptRunner for Cloud.

The problem is as script modify user by async calling REST api it's done after UI shows issue, so in UI user is not updating. After resfresh off page everything is OK.

Any suggestions for workaround? I tried to sleep post-function for some time, but unsuccessfully.

Thanks in advance for any help! Scripting JIRA is cool, luckily we can do it in Cloud also now smile 

1 answer

1 accepted

Hi Pavel,

All add-on interaction with JIRA in the cloud is async so often the page is loaded before updates can be applied. It is a fundamental limitation with the Connect framework on which cloud add-ons are built. We do try to give an indication that the issue has been updated with a message, and when Atlassian support it we will add a button to refresh the issue on that message.

Sleeping in a post function will have no effect because JIRA does not wait for post functions to complete.

Regards, Jon 

Dave Meyer Atlassian Team Nov 04, 2016

@Jon Mort (Adaptavist)'s overview of the problem is exactly correct. We expect to make improvements to the view issue page over the next year to address this problem. Please refer to ACJIRA-1098 for now.

@Robert Massaioli @Dave Meyer @Jon Mort (Adaptavist)

Guys, thanks for answers!

I have seen some dialogs, for other plugins for updating visible tickets. Like 

[LEN-3823] TDS Indecision 2016-11-07 17-16-17.png
At least such dialog will help. Why Scriptrunner  doesn't show it?

Thanks,
Pavel 

Hi Pavel,

I think that is ScriptRunner functionality. There are timing issues with it however so sometimes the script executes quickly and the change is not detected quickly enough. It really is a workaround until Atlassian address ACJIRA-1098.

Jon

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,813 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot