Questions for Confluence license has expired.

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

Historical attachment sync

 
1
0
-1
Hi Team, I have two instance of JIRA one is on Private & the other one is Public. Whenever I am trying to sync historical attachments are not getting synced. Any new attachmet I am adding is getting synced but old attachments are not getting synced. Can you suggest some ways to do that or any rule that need to be added. Default rules are already there.
  1. Nishant Sood

    Can someone please update on this if there is any solution.

  2. Roman

    Hi Nishant Sood ,


     Have you tried using the connect operation and use Send all existing attachments in advanced option https://docs.idalko.com/exalate/display/ED/Connect+Operation ?

  3. Nishant Sood

    Hi Roman,


    Yes I have tried it but it doesn't work, I have not tried bulk connect as there are 400-500 issues.


    Below are the rules.


    INCOMING Rule

    if(firstSync && replica.project.key == "TPE"){
    issue.projectKey = "TPOHK"
    issue.typeName = nodeHelper.getIssueType(replica.typeName)?.name ?: "Task"
    }
    if(firstSync && replica.project.key == "TPOHK"){
    issue.projectKey = "TPE"
    issue.typeName = nodeHelper.getIssueType(replica.typeName)?.name ?: "Task"
    }
    issue.summary = replica.summary
    issue.description = replica.description
    issue.labels = replica.labels
    issue.comments = commentHelper.mergeComments(issue, replica)
    issue.attachments = attachmentHelper.mergeAttachments(issue, replica) -this also tried
    issue.attachments.addAll(replica.addedAttachments) - this also tried
    // or issue.attachments += replica.addedAttachments
    issue.components = replica.components
    issue.created = replica.created
    issue.updated = replica.updated
    issue.resolutionDate = replica.resolutionDate
    issue.affectedVersions = replica.affectedVersions
    issue.fixVersions = replica.fixVersions
    issue.originalEstimate = replica.originalEstimate
    issue.remainingEstimate = replica.remainingEstimate
    issue.timeSpent = replica.timeSpent
    issue.environment = replica.environment
    issue.status = replica.status
    issue.resolution = replica.resolution
    issue.type = replica.type
    issue.priority = replica.priority

    /*
    User Synchronization (Assignee/Reporter)

    Set a Reporter/Assignee from the source side, if the user can't be found set a default user
    You can use this approach for custom fields of type User
    def defaultUser = nodeHelper.getUserByEmail("default@idalko.com")
    issue.reporter = nodeHelper.getUserByEmail(replica.reporter?.email) ?: defaultUser
    issue.assignee = nodeHelper.getUserByEmail(replica.assignee?.email) ?: defaultUser
    */

    /*
    Comment Synchronization

    Sync comments with the original author if the user exists in the local instance
    Remove original Comments sync line if you are using this approach
    issue.comments = commentHelper.mergeComments(issue, replica){ it.executor = nodeHelper.getUserByEmail(it.author?.email) }
    */

    /*
    Status Synchronization

    Sync status according to the mapping [remote issue status: local issue status]
    If statuses are the same on both sides don't include them in the mapping
    def statusMapping = ["Open":"New", "To Do":"Backlog"]
    def remoteStatusName = replica.status.name
    issue.setStatus(statusMapping[remoteStatusName] ?: remoteStatusName)
    */

    /*
    Custom Fields

    This line will sync Text, Option(s), Number, Date, Organization, and Labels CFs
    For other types of CF check documentation
    issue.customFields."CF Name".value = replica.customFields."CF Name".value
    */

    -----------------------------------------------------------------------------------------------------------------------------------


    OUTGOING Rule


    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.priority = issue.priority
    replica.attachments = issue.attachments
    replica.project = issue.project

    //Comment these lines out if you are interested in sending the full list of versions and components of the source project.
    replica.project.versions = []
    replica.project.components = []

    /*
    Custom Fields

    replica.customFields."CF Name" = issue.customFields."CF Name"
    */

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    Nishant Sood I believe my colleague is already looking at this in EASE-5348 is that correct?

    1. Nishant Sood

      Yes. I have raised an issue too for this.

    CommentAdd your comment...