Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to move issue from one issue type to other.

Ramya Yarru January 11, 2021

 Issue #1:

 

Unable to Move "Story" or "Dependency" to "Defect" on same project.

 

Technical details

Log's referral number: 3ed28fec-29a8-4c00-9583-f8524b3e6ea2

Cause

Referer URL: *https://jira.davita.com/secure/MoveIssueUpdateFields!default.jspa?id=584738&assignee=null*
Assertion failed: assert issue.projectId // Missing projectId in fieldValues | | | null com.atlassian.jira.issue.IssueImpl@7e73d642 (toString() == null)

Assertion failed: assert issue.projectId // Missing projectId in fieldValues | | | null com.atlassian.jira.issue.IssueImpl@7e73d642 (toString() == null) at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:415) [?:?] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) [?:?] at com.onresolve.scriptrunner.canned.jira.fields.editable.TemporaryIssueService.populateForCreation(TemporaryIssueService.groovy:78) [?:?] at com.onresolve.scriptrunner.canned.jira.fields.editable.TemporaryIssueService$populateForCreation.call(Unknown Source) [?:?] at com.onresolve.scriptrunner.runner.field.IssueParametersCapturingImmutableCustomField.validateParams(IssueParametersCapturingImmutableCustomField.groovy:85) [?:?] at com.atlassian.jira.web.action.issue.MoveIssueUpdateFields.doValidation(MoveIssueUpdateFields.java:192) [classes/:?]

  

Issue#2

Unable to move "dependency" to "defect" on same project. 

Technical details

Log's referral number: 87a3e369-a852-4802-9be4-0df6796ba6c2

Cause

Referer URL: *https://jira.davita.com/secure/MoveIssueUpdateFields!default.jspa?id=565696&assignee=null*
Assertion failed: assert issue.projectId // Missing projectId in fieldValues | | | null com.atlassian.jira.issue.IssueImpl@5bf5a41c (toString() == null)

Assertion failed: assert issue.projectId // Missing projectId in fieldValues | | | null com.atlassian.jira.issue.IssueImpl@5bf5a41c (toString() == null) at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:415) [?:?] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670) [?:?]

1 answer

0 votes
Nic Brough -Adaptavist-
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.
January 12, 2021

Could you show us the script?

Ramya Yarru January 12, 2021

Hello @Nic Brough -Adaptavist- 

 

How do we determine which script is causing this error? Also while moving the issue would that use create screen or edit screen? 
We have no scripted fields in create screen but we do have 4 to 5 scripted fields in edit and view screen so would like to know which field must be causing this to provide you the script.

Nic Brough -Adaptavist-
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.
January 12, 2021

You need to look at how you are doing this "move" to see where a script might be being used.

I had assumed you were running a script (and hence knew where it was) because you only gave us errors implying it was a problem in a script.

Ramya Yarru January 12, 2021

I have just used "move" option on the story issue that needs conversion wherein I choose destination project and issue type as bug and then fill in mandatory fields in "update fields" tab and submit and I get those errors.

I did notice that Update fields tab has lot more different fields that create screen in bug issue doesn't have and we have some validators for creating bug where those fields were displayed while manually creating issue but they were missing in update fields tab while moving the issue.

Nic Brough -Adaptavist-
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.
January 12, 2021

Ok, my guess (as there's not enough of the error logs to be sure, but maybe enough from the pointers you have expanded on) is that you have a scriptrunner scripted field in the new issue that either

  • cannot be calculated as it doesn't exist for the target type
  • cannot be calculated because the target issue type does not have access to things the script is trying to use (and the script isn't coded to protect itself against that, the writer has just assumed the data will always be there)

I would start with a look through the list of all your custom fields, looking for scripted fields and noting the ones that are valid for your target project and issue type, and then have a look at the scripts behind each one

Suggest an answer

Log in or Sign up to answer