Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-4688

Error moving Issue without Issue Picker field to an Issue type with Issue Picker field

    Details

    • Critical Points:
      7.9

      Description

      High Level Summary

      Both scenario returned assertion error in TemporaryIssueService.populateForCreation(TemporaryIssueService.groovy:78)

      2020-09-15 07:04:16,997+0000 http-nio-8080-exec-4 ERROR      [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=86f3a003-0679-460a-82da-94ebbbbb447a, interpretedMsg=, cause=Assertion failed: 
          
          assert issue.projectId // Missing projectId in fieldValues
                 |     |
                 |     null
                 com.atlassian.jira.issue.IssueImpl@28287fee (toString() == null)
          , stacktrace=Assertion failed: 
              
              assert issue.projectId // Missing projectId in fieldValues
                     |     |
                     |     null
                     com.atlassian.jira.issue.IssueImpl@28287fee (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) [?:?]
      

      Scenario 1

      Steps to reproduce:

      • Create a custom Scripted Field with a Single Issue Picker
      • Assign the context of the Issue Picker field to a specific project and single Issue type e.g. "Bug".
      • Try to move an issue type which doesn't have the Issue Picker field assigned to its context e.g. "Task".

      Expected behaviour
      The move works successfully.

      Actual behaviour
      The move fails and Jira throws an error (see video and logs attached)

      Note: This happens when we move any Issue which doesn't have a "Single Issue Picker" field configured into any other Issue type that does have a "Single Issue Picker" field configured.

      Workaround
      I found that the error does not occur if the "Single Issue Picker" field:

      • Is not configured to any Issue types
      • Is configured to both of the the Issue types I'm moving "from" and "to".

      Scenario 2

      After user upgraded Script Runner 6.5.0 to 6.7.0, we are seeing error below after cloning issue using Bob Swift Clone Plus app.

      Can't reproduce the problem in Script Runner 6.5.0

      Steps to reproduce:

      1. Install Bob Swift Clone Plus addon
      2. Add Picker field to the issue screen.
      3. Go to the issue view > More > Clone+ option
      4. Clone issue and get the error message.

      Demo - Screen Recording 2020-09-15 at 3.04.09 PM.mp4

      Workaround

      • Remove any Picker field from the screen.

        Attachments

        1. move-bug-logs
          37 kB
        2. reproduced-move-bug.mov
          15.56 MB
        3. Screen Recording 2020-09-15 at 3.04.09 PM.mp4
          867 kB
        4. screenshot-1.png
          screenshot-1.png
          644 kB

          Issue Links

            Structure

              Activity

                People

                Assignee:
                jechlin Jamie Echlin
                Reporter:
                jbaldwin Joe Baldwin
                Votes:
                1 Vote for this issue
                Watchers:
                12 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Structure Helper Panel