You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I found code to help me set the description field based on proforma data and with a few changes was able to set the summary field within Scriptrunner's console. However, when I moved the code from the console to a post-function I can't get it to work. Kepp getting null pointer exception for the issue. However I thought script runner post-function automatically have access to the issue. Am I wrong? Have I been staring at the code too long?
Where in your post function did you put your code?
Is this on the "Create" transition?
And if so, did you put it before the issue have been saved or after?
I don't have access or experience with proforma, but I had a similar issue with the "Bundled Field" from the Extension for JSM plugin.
For me, I was able to fix the issue by moving my post function after the issue save (but then the script has to take care of saving the change and re-indexing).
If you put your code after the save, it might be helpful to fetch a fresh issue object using issueManager.getIssueObject(issue.id).
This way, if proforma is somehow adding the info in an asynchronous way to the issue, you will be getting the most recent version of the issue and the proforma data might be available.
Beyond that, I'm not going to be much more help without exact code, logs and access to an env with proforma.