Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,357
Community Members
 
Community Events
185
Community Groups

Why do scripted field scripts get executed at jira startup?

Edited

Hey there,

i am currently developing some scripted fields on our jira test instance and was wondering why the underlying scripts get not only compiled, but also are executed at jira startup.

Interesting thing is even Issue issue = issue  contains, according to the logs, an real issue object.

That results in a flooded atlassian-log, cuz some methods for example "getLoggedInUser.getName" of course throw a NullPointerException.

This is not acceptable for production use.

One more thing to point out is that after deleting all issue index files and restarting, the scripts do not get executed.

 

What is going on here? Is Jira-/Scriptrunner trying to restore some old sessions? Is this some sort of caching? Is this some sort of default behaviour? And most important how can i turn it off?

 

Additional Information:

Jira Version: 7.x

Scriptrunner Version: 5.0.14

Scripts are on server in own script root folder

It looks like the script is not executed for all, but only some (random?) Issues

1 answer

1 accepted

1 vote
Answer accepted
Daniel Yelamos [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.
Jan 17, 2018

Hi Felix.

This is not intended behaviour. I can say with confidence that Scriptrunner does not do that by itself, and I can demo this in a vanilla instance for you whenever you want. 

Things that could be causing this:

1. Rest request at the start of your instance to an issue that contains that scripted field.

2. Some kind of reindex at the start that forces recalculation of some subset of your scripted fields.

3. Another third party accessing an issue at the start.

If you feel like this is a bug in your instance I would advise you to raise a ticket in our customer support portal. We'd be glad to take a look.

If this solved your answer, please accept the answer so that other users know that this question has been solved.

May I help you further?

Cheers!

Dyelamos

Thanks for your reply and sorry for the late response @Daniel Yelamos [Adaptavist].
Ill take a deeper look into it and come back to you.


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events