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
Next: Root
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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi,
I'm running Jira Service Desk Server with Scriptrunner 6.9.1.
I have a Scriptrunner database picker in my request form and I want to validate its content before the issue is created. However in the custom validator I am not able to get its content with the usual
def cField = customFieldManager.getCustomFieldObjectsByName("field name")[0]
def cFieldValue = issue.getCustomFieldValue(cField)
because cFieldValue is always null. I'm sure the code works because I can get other field values. I can also retrieve options when the issue is already created.
Is this a bug? If not, how can I achieve my goal?
By the way:
log.warn(customFieldManager.getCustomFieldObjects())
prints
[com.onresolve.scriptrunner.runner.field.IssueParametersCapturingImmutableCustomField@72617c4c, Approvals, Approvers, Customer Request Type, Linked major incidents, Organizations, com.onresolve.scriptrunner.runner.field.IssueParametersCapturingImmutableCustomField@7d3bc00e, Request participants, Satisfaction, Satisfaction date, System, Time to first response, Time to resolution, Type, issueFunction]
These bolded fields are the ones I can't print.
With the exact same code, I was able to solve this issue by upgrading to ScriptRunner 6.10.0.
I believe this is related to https://productsupport.adaptavist.com/browse/SRJIRA-4611.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.