Forums

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

Scriptrunner Behaviours - Using screen ID in Initialiser

Veronica Kolstad
Contributor
August 20, 2018

I'd like to implement a pre-filled Description field for any project using a certain workflow, so I set up a Behaviour based on the Screen ID of the Create Issue screen for that workflow. However, it's not working. If I remove the screen ID check, it works as expected on all screens, but that's not what I want  :)

 

def desc = getFieldById("description")

 

def descDefaultValue = """blah""".replaceAll(/ /, '')

 

if (FieldScreen.getId() == 12903) {

     if (! underlyingIssue?.description) {

          desc.setFormValue(descDefaultValue)

     }

}

 

Apologies in advance if I missed something simple. Thanks for the feedback.

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Anja Brkljacic
Contributor
September 25, 2020

Here is the error the user gets: 

load error.PNG

Lee Wonnacott
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
September 28, 2020

Hi Anja! 

I'm sorry to hear that you are running into issues with ScriptRunner for Confluence! 

I can't be sure of the exact reason as to why this error is occurring but I believe that the answer to your problem will lie within your HAR files. 

You can check this yourself with the guide here, or if you prefer we can analyse this file together if you create a ticket via our support portal here.

Please let me know if you have any questions on this! 

Kind regards, 
Lee 

Like # people like this
TAGS
AUG Leaders

Atlassian Community Events