1
0
-1
2 answers
- 10-1
Hi all, hi Francis Martens (Exalate) ,
found the bug. The parentId is not necessarily sent during the first sync (both ways by our Jira instances), so the
if(firstSync && replica.parentId){
should be like that:
if(firstSync && replica.parentId){
This should also be done, when you want to stay open of tickets that are changed from standardtasks to subtasks or vice versa.
Cheers, Johannes
CommentAdd your comment... - 10-1
Can you focus for a moment on following code piece
/* Deal with subtasks */ if(firstSync && replica.parentId){ issue.typeName = "Sub-Task" //Make sure to use the right subtask type here. def localParent = nodeHelper.getLocalIssueFromRemoteId(replica.parentId.toLong()) if(localParent){ issue.parentId = localParent.id } else { 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" ) } }
You should check if
- replica.parentId is set
- The block is being entered into
- The subtask type name is correct (sometimes it is 'sub task') or a variation
- Is the localParent found (is it set)
When wondering how, use debug.error
debug.error("Show me ${someValue}")
- Johannes Glück
Hi thanks. checked all.
it showed, that sometimes in firstSync the parentId is null... So after removing && firstSync it works.
firstSync would also avoid handling a subtask, which was moved from a standardissuetype to become one.
Are there any performanceissues? If not, I would recommend to alter the sample.
Cheers, Johannes
CommentAdd your comment...
Overview
Content Tools
search
attachments
weblink
advanced
Hi
Exalate works great for us...
However we now try to add subtask functionality on both sides… And the snippets taken from your knowledgebase lead to tickets with the proper ticket type, but are not added as subticket to the task on the receiving side.
Can you please help?
INGOING SCRIPT
OUTGOING SCRIPT