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

Narendra Kumar 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-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 July 5, 2021

Redacted.

Suggest an answer

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

Atlassian Community Events