[scriptrunner] validateTransition results in IllegalArgumentException

Paul Lewicki October 25, 2021

Hi folks,

essentially by using this script I'm facing the below IllegalArgumentException. Somehow it seems to interfere with the xray (xpandit) addon but for this particular workflow / issue / screen there is no xray configured.

at TSOPL.CloseSubTasks_config.run(CloseSubTasks_config.groovy:35)
at TSOPL.CloseSubTasks_config$_run_closure1.doCall(CloseSubTasks_config.groovy:66)
at com.atlassian.jira.bc.issue.IssueService$validateTransition$0.call(Unknown Source)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateTransition(DefaultIssueService.java:442)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateTransition(DefaultIssueService.java:484)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndUpdateIssueFromFields(DefaultIssueService.java:703)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParams(DefaultIssueService.java:911)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateAndPopulateParamsWithoutScreenCheck(DefaultIssueService.java:998)
at com.atlassian.jira.bc.issue.DefaultIssueService.validateParams(DefaultIssueService.java:1116)
at com.atlassian.jira.issue.fields.ImmutableCustomField.validateParams(ImmutableCustomField.java:705)
at com.xpandit.raven.customfield.PreConditionEditorCustomField.validateFromParams(Unknown Source)
at com.xpandit.raven.customfield.PreConditionEditorCustomField.a(Unknown Source)
at com.xpandit.raven.customfield.PreConditionEditorCustomField.a(Unknown Source)
at com.xpandit.raven.customfield.service.impl.DefaultRavenCustomFieldValueProvider.l(Unknown Source)
at com.xpandit.raven.service.impl.RavenIssueTypeServiceImpl.validateIssueOfType(Unknown Source)
java.lang.IllegalArgumentException: Issue 'ISSUE-1' is not of type Pre-Condition

 

It's crashing on this line

IssueService.TransitionValidationResult theValidationResult = ComponentAccessor.getIssueService().validateTransition(theRemoteUser, theSubtaskIssue.getId(), 2, theIssueInputParameters)

 

Does someone have a clue what's going on here?

 

Jira Server: v8.13.6
X-ray: 4.2.14 

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 2021

Hi @Paul Lewicki 

Would you please check if, in your instance, the Xray custom fields, like "Conditions" or "Pre-Condition Type," exist associated with other screens/issue types that are not Xray issue types?

This could be a probable cause if it happens since Xray Custom fields should only be used in Xray issue types.

If you need further help, please get in touch with Xray Support (http://xraysupport.getxray.app); so that we can investigate further.

Thank you.

Kind regards,
Rogério Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer