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).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.