I want to validate a JSM request using scriptrunner in the create step. But I'm struggling to get it to work.
I have the following to check the id of an Asset field is the value e want and to also check a second dependent field is populated.
(issue?.customfield_12411.filter(it => it.objectId == "608").length > 0)
&&
issue?.customfield_10344 != null
This works as expected in the Test option o the validator set up screen.
But in situ, creating a request ticket in the portal it returns the error message in all conditions.
Has anyone accessed Cloud Assets in a jira expression?
@Tom ListerI know that when we were using ProForma for forms, we had a hell of a time getting the values of custom fields. Essentially no matter what we did, if the validator was running on issue create it would run BEFORE the custom field had a value filled in.
I think I eventually ended up adding some code to my validator that first reindexed the specific issue, and only then checked it for the value of the custom field.
Hi @Ken McClean
I have been told by Appfire that this is a known bug and is being tracked here
https://jira.atlassian.com/browse/JSDCLOUD-12479
We may look at automation to check the data and notify the reporter that there are data conditions to check.
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.