Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Sub task are not syncing in destination

 
1
0
-1


Hi Team,

We have a scripted connection for outgoing and incoming in same instance.

Below is the configuration used in outgoing and incoming script.

Here we tried to sync subtask to destination side, but is not syncing and didn’t get any error.

Please help on this.


Outgoing side:

if (issue.project.key == "DAR" && issue.typeName == "Defect")
{
replica.key            = issue.key
replica.type           = issue.type
replica.assignee       = issue.assignee
replica.reporter       = issue.reporter
replica.summary        = issue.summary
replica.description    = issue.description
replica.labels         = issue.labels
replica.comments       = issue.comments
replica.resolution     = issue.resolution
replica.status         = issue.status
replica.parentId       = issue.parentId
replica.attachments    = issue.attachments
replica.project        = issue.project
replica.priority       = issue.priority 

//DAR Fields
//exposes the value of custom field in project A to the scripting for project B

replica.customFields."11030" = issue.customFields."11030" //Defect Change Type//OEM Defect Change Type
replica.customFields."10113" = issue.customFields."10113" //Customer Severity//OEM Customer 
}


Incoming side:
if(replica.project.key == "DAR" && replica.type.name == "Defect") //sync A -> B
{
  issue.projectKey   = "OEM"
  def issueTypeMapping = [
  "Defect" : "Acquired Product Defect"
]
 
issue.typeName = issueTypeMapping[replica.type?.name] ?: "Acquired Product Defect"
  
  issue."17004" = replica."11030" //Defect Change Type//OEM Defect Change Type
  issue."17006" = replica."10113" //Customer Severity//OEM Customer Severity
  if(replica.parentId){
    issue.typeName     = "Action Item" //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" )
    }
}


issue.summary      = replica.summary
issue.description  = replica.description
issue.comments     = commentHelper.mergeComments(issue, replica)
issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
issue.labels       = replica.labels
issue.assignee     = replica.assignee
issue.reporter     = replica.reporter

issue.resolution   = replica.resolution
issue.status       = replica.status
issue.priority     = replica.priority
issue.key          = replica.key
}
    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Was the exalate operation triggered on the subtask?

      1. Moogambigai G R

        Hi Francis,


        No, we didn't put any trigger for  subtask, i was trying to sync when parent issue is synced to destination subtask also sync.



      2. Moogambigai G R

        Hi Francis,


        Is there any configuration to sync subtask when parent sync in Jira server?


      3. Moogambigai G R

        Hi Francis,


        Is there any update?


        Regards,

        Moogambigai G R

      4. Moogambigai G R

        Thank you Francis, it's work great.

      5. Moogambigai G R

        Hi Francis Martens (Exalate) 


        Is there any same way to unexalate subtask when parent is unexalated?


        Regards,

        Moogambigai G R

      6. Francis Martens (Exalate)

        The approach can be the same.  An unexalate event will be raised whenever an unexalate is completed.  I guess it is a good exercise to adapt the code.


      7. Moogambigai G R

        Hi Francis Martens (Exalate) 


        I have used the same configuration, instead of selecting exalate in listener, i have selected below one.

        But when i unexlated the parent record, subtask is not unexalated, still showing a destination link in subtask.


      8. Moogambigai G R

        Hi Francis Martens (Exalate) 


        Hope you are doing good.


        Is there any changes in configuration except changing the Events name.


        Regards,

        Moogambigai G R

      CommentAdd your comment...