Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Scriptrunner No custom field with the name '<field>' is associated with this issue content

Ismael Jimoh
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.
May 18, 2024

I have a few fields that are associated with a project and when creating an issue from the UI, I can successfully create the issue with the issue type and project but when I attempt creating an issue using scriptrunner post function, I get the error:

2024-05-18 10:30:29,259 INFO [runner.ScriptBindingsManager]: Current Issue NOPM-1 
2024-05-18 10:30:29,259 INFO [runner.ScriptBindingsManager]: Current Issue NOPM-1
2024-05-18 10:30:29,259 INFO [runner.ScriptBindingsManager]: Current Issue's issue type: Epic
2024-05-18 10:30:29,259 INFO [runner.ScriptBindingsManager]: Current Issue's issue type: Epic
2024-05-18 10:30:29,259 INFO [runner.ScriptBindingsManager]: Value from the Product Line Field: [Identity, Cards]
2024-05-18 10:30:29,259 INFO [runner.ScriptBindingsManager]: Value from the Product Line Field: [Identity, Cards]
2024-05-18 10:30:29,259 DEBUG [runner.ScriptBindingsManager]: Contains Others? false
2024-05-18 10:30:29,259 DEBUG [runner.ScriptBindingsManager]: Contains Others? false
2024-05-18 10:30:29,259 DEBUG [runner.ScriptBindingsManager]: Contains identity? true
2024-05-18 10:30:29,259 DEBUG [runner.ScriptBindingsManager]: Contains identity? true
2024-05-18 10:30:29,259 DEBUG [runner.ScriptBindingsManager]: Another way of checking value: false
2024-05-18 10:30:29,259 DEBUG [runner.ScriptBindingsManager]: Another way of checking value: false
2024-05-18 10:30:29,269 ERROR [workflow.AbstractScriptWorkflowFunction]: Workflow script has failed on issue NOPM-1 for user 'ismael.jimoh'. View here: https://jira.solarisbank.de/secure/admin/workflows/ViewWorkflowTransition.jspa?workflowMode=live&workflowName=New+PO%3A+Partner+Onboarding+Project&descriptorTab=postfunctions&workflowTransition=231&highlight=1
com.adaptavist.hapi.jira.issues.exceptions.NoSuchCustomFieldInContextException: No custom field with the name 'Teams (OPM)' is associated with this issue context at com.adaptavist.hapi.jira.issues.delegate.AbstractIssuesDelegate.getCustomFieldFromName(AbstractIssuesDelegate.groovy:561)
at com.adaptavist.hapi.jira.issues.delegate.AbstractIssuesDelegate.setCustomFieldValue(AbstractIssuesDelegate.groovy:573)

at de.xxxx.plugins.jira.groovy.scriptrunner.workflow.postfunctions.opmHandOverCheckTasks$_run_closure1.doCall(opmHandOverCheckTasks.groovy:33)

at de.xxxx.plugins.jira.groovy.scriptrunner.workflow.postfunctions.opmHandOverCheckTasks$_run_closure1.doCall(opmHandOverCheckTasks.groovy)
at com.onresolve.fixture.groovy.ClosureUtil.callWithDelegateFirstAndReturnFromClosure(ClosureUtil.groovy:22)
at com.onresolve.fixture.groovy.ClosureUtil$callWithDelegateFirstAndReturnFromClosure$0.callStatic(Unknown Source)

at com.onresolve.fixture.groovy.ClosureUtil$callWithDelegateFirstAndReturnFromClosure$0.callStatic(Unknown Source)

 

The problem is I had the same configuration on our test instance (same JIRA version, etc) and this worked correctly however I do the same with  the production after copying my configuration using Configuration manager and it keeps throwing the above error.

As mentioned, I can create the issue from the UI with the same issue type and project and it works but doing the same with Scriptrunner isn't.

1 answer

1 accepted

1 vote
Answer accepted
Ismael Jimoh
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.
May 18, 2024

Sorry, please ignore.

When I imported the project with CMJ, I had created a new project but with a different key.

I really just dawned on me as I was pasting this.


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events