Forums

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

Script runner code length is too high....?

Narendra Kumar
Contributor
April 29, 2020

Hi,

I wrote a code in groovy for one of post function. It'll run using script runner add-on. 

When it was added in post function then it shows a warning as "It looks like you're adding a lot of code to your post function. This may cause jira to stop loading post function page for this transition. Try creating more post functions with less code instead."

Please let me know if it can stop my post function to work correct. 

Mostly lines in code are commented by me as well. 

Can It impact my script to run ?

Thanks..

2 answers

0 votes
Nic Brough -Adaptavist-
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 Leaders.
May 3, 2020

This check is a simple one based purely on the size of the script.  It doesn't look at the code, or differentiate between lines that would run and lines that do nothing, it just assumes every line will do something, and hence take longer.

0 votes
Nir Haimov
Community Champion
April 30, 2020

@Hi @Narendra Kumar 

I never encountered this issue, so can't tell for sure.

Why not just remove the commented and unnecessary code?

Or splitting the code as the error message suggest?

Bill Bill
Contributor
July 5, 2021

Redacted.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events