1
0
-1

I am trying to sync up issues status between Jira and GitHub. I have it so that if I change status in Jira it will Change in GitHub but when I do it vice Verse Jira does not reflect the status change from GitHub. Can someone please review my script from both the Jira and GitHub Side.


  1. John Roca

    hi Ariel Aguilar thanks for you help! I actually continued to mess around with the code it turned out that on the Jira side the words "Open" and "Closed" needed to start with a lowercase letter to match the form of the incoming status from GitHub. it now works. I appreciate your answer response though.

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    Hi there,

    I see the problem is the mapping on the Jira incoming script. If the GitHub script is working from Jira to Gihub, then the Jira Incoming script should be something like:

    def statusMap = [
                "Open": "To Do",
                "Working on it": "In Progress",
                "Closed" : "Done"
    ]
    def remoteStatusName = replica.status.name
    issue.setStatus(statusMap[remoteStatusName] ?: remoteStatusName)

    Let me know if this works for you.

    Kind regards,

    Ariel

      CommentAdd your comment...