Bulk move of Task to Subtask causes error

Originally asked by Jasmin on 24 February 2022 (original question)


Hi,

I’m basically using the snippet from the documentation.

    def localParent = null
    if (replica.parentId) {
        localParent = nodeHelper.getLocalIssueFromRemoteId(replica.parentId.toLong())
    }

    // do at first sync
    if(firstSync){
        if (replica.parentId && replica.type?.name == "Sub-task") {
            if(!localParent){
                throw new com.exalate.api.exception.IssueTrackerException("Subtask cannot be created: parent issue with remote id " + replica.parentId + " was not found. Please make sure the parent issue is synchronized before resolving this error" )
            }
        }
    }

    issue.projectKey = projectKey
    issue.parentId = localParent?.id ?: null

If I convert a Task to a Subtask, it works.

If I bulk move (=convert) more Tasks to Subtasks, I get an exception.

Could not update issue `EXIII-33` with id `45700`: Field issuetype: Issue type is a sub-task but parent issue key or id not specified.. Check the documentation for more details.

I checked the values for replica.parentId and local.parentId, information is correct.

Any ideas?

Best, Jasmin


Comments:

Harold Oconitrillo commented on 08 March 2022

Hi Jasmin,

When you say Bulk move, what exactly is the operation that you are performing? Can you elaborate?

Kind regards,

Harold Cruz

Jasmin commented on 09 March 2022

sure.
Harold Oconitrillo

I’ll start in issue navigator

next step bulk change move

and finally change task to subtask and define parent

Jasmin commented on 12 May 2022

similar problem when moving an Epic to Task, Exalate cannot handle this. does anyone have an update on this?

we have projects where tickets get moved around and I have to maintain the queue on a daily basis.

Answer by Jasmin on 16 March 2022

Sync of Subtask that are bulk moved simply does not work, I have no solution for that.

Manually moving the Task to Subtask on the target instance resolves the error, so this is a workaround.

Best, J.