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

Can I set my summary field based on data from proforma forms?

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?

1 answer

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Dec 20, 2022

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).

Yes, it's on the "Create" transition. I've tried moving it after the issue save post function but no luck. 

It's partially filling the summary but doesn't seem to be getting the field value data. 

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Dec 22, 2022

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.

I'm using issueManager.updateIssue to update the issue. I have been told it's nice to have and not a requirement so I'll probably sleep on it and hopefully the solution will hit me in my dreams.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events