Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scripted Field will only display linked issue with a time delay

Rolf Lader
Community Champion
November 21, 2024

Hello

I create a new issue via a validation script on a transition (to itself). This newly created issue is linked to the original (triggering) issue via an issue picker field.

On the original issue, a scripted field is available which shows a link to the created issue, which is searched for via a JQL.

After a new issue has been created, the link to the new issue is not displayed for approx. 8-10 seconds. So I have to refresh the original issue several times until the scripted field displays the newly created issue.

Is there a way to show the newly created issue immediately after the transition has been completed?

Thanks for your help, Rolf

1 answer

0 votes
Florian Bonniec
Community Champion
November 21, 2024

Hi @Rolf Lader 

Is it a Custom Scripted field or another Script field type ?

I would probably avoid using a scripted field and use a custom field to store the information. You can use listener or automation to populate it. 

The script field is calculated when you view the issue. If you use a JQL to find it it may be slow because it run the JQL and depends on your index. You could replace JQL by groovy function such as 'issue.getOutwardLinks()'.

 

Regards

 

 

 

Rolf Lader
Community Champion
November 21, 2024

Hello @Florian Bonniec 

Thank you very much for your quick response.

Unfortunately, I was a little imprecise in my description of the problem.

I am using an Issue Picker type field in the newly created issue (type) to create the link to the original issue and a Scripted Field (from scriptrunner) in the original field to display a link to the newly created issue.

And the calculation of this link via a JQL is completely sufficient in terms of speed. However, the time delay occurs when the issue has just been created. Presumably the index for the newly created issue is not yet up to date, so that the query does not find this new issue.

Do you know a way to avoid this time delay (whatever causes it) so that the user sees the new issue right after the transition?

Best regards, Rolf

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.22.4
TAGS
AUG Leaders

Atlassian Community Events