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

Copy project fails with error "isSubTask" is not a field of IssueType when copying links

    XMLWordPrintableJSON

    Details

    • Sprint:
      Sprint 26 - Ends Sept 1, Sprint 26 - Ends Oct 3
    • Critical Points:
      1

      Description

      Copying links for issues in copy project built-in script causes:

      WARN 2016-07-19 14:26:47,368 [canned.jira.utils.AbstractCloneIssue] Failed to copy links on issue SSPA-7
      java.lang.IllegalArgumentException: [GenericEntity.get] "isSubTask" is not a field of IssueType
      	at org.ofbiz.core.entity.GenericEntity.get(GenericEntity.java:211)
      	at org.ofbiz.core.entity.GenericEntity.get(GenericEntity.java:987)
      	at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1245)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1214)
      	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1021)
      	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:47)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      	at com.onresolve.scriptrunner.canned.jira.utils.AbstractCloneIssue$_copyLinks_closure6.doCall(AbstractCloneIssue.groovy:21
      

      It seems like its caused by checking the generic value of the new issue. Specifically this line:

      newissue.issueType.isSubTask()
      

      To reproduce:
      Go to copy project on JIRA 6.
      Select to copy issues from a project
      When finished not all issues are copied across because of the above exception when checking if there is a subtask

        Attachments

          Activity

            People

            Assignee:
            jcarter Jonny Carter
            Reporter:
            amarkham Adam Markham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 1 day
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified