Details
-
Bug
-
Status: Done
-
Low
-
Resolution: Duplicate
-
7.8.0, 7.11.0, 7.12.0
-
None
-
None
-
0
Description
Let's say we have Script Field A and B. Getting the value of a Script Field B from Script Field A works fine. Preview Script Field A works the first time, but when trying to preview Script Field A for the second time onwards, it loops and throws StackOverflowError.
Able to reproduce in:
Jira Version | ScriptRunner Version | Able to Reproduce |
---|---|---|
8.22.6 | 7.12.0 | yes |
9.4.2 | 7.12.0 | yes |
9.6.0 | 7.12.0 | yes |
Steps to Reproduce
- Create two Script Fields:
Script Field A:import com.atlassian.jira.component.ComponentAccessor def scriptField = ComponentAccessor.customFieldManager.getCustomFieldObjectsByName('case-29165-24201field').first() def scriptFieldValue = issue.getCustomFieldValue(scriptField) as String if(scriptFieldValue){ scriptFieldValue }
Script Field B:
return "some text"
- On Script Field A configuration screen, type any issue that has both script fields, click "Preview".
- Click preview again.
Expected Behaviour
It should be working just like the first click of "Preview".
Actual Behaviour
It loops and crashes on StackOverFlow Exception.
Additional Info
- Stack trace: stacktrace.log
- Video Recordings:
Jira 8.22.6 + ScriptRunner 7.12.0 | jira8.22.6_sr7.12.0.mov![]() |
Jira 9.4.2 + ScriptRunner 7.12.0 | jira9.4.2_sr7.12.0.mp4![]() |
Jira 9.6.0 + ScriptRunner 7.12.0 | jira9.6.0_sr7.12.0.mov![]() |
Attachments
Issue Links
- duplicates
-
SRJIRA-5983 Preview in Script Field configuration causes StackOverflow if it is getting a value from another Script Field
-
- To Do
-