Questions for Confluence license has expired.

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

How do i use IDs?

 
1
0
-1

for example i have status cool with id 4711 and mega with id 6677 how would i use them?

if (issue.status.name == "4711" || issue.status.name == "6677") {
Status.receive(useRemoteStatusByDefault = true, workflowMapping = [
"Resolved" : "4711,
"Closed" : "6677"
], resolutionMapping = [:])
}

Do i use " or ' or just the ID without " or '?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      You can compare against the id of the status like in


      if (issue.status.id == 4711 || issue.status.id == 6677) {
      ...
      }



      The Status.groovy external script assumes that the value part of the workflowMapping is a name and not an id.
      Of course - you can adapt in the external script.




        CommentAdd your comment...
      1.  
        1
        0
        -1

        Thanks for the fast reply.

        Does that also mean i use

        "Resolved" : 4711,
        "Closed" : 6677

        instead of
        "Resolved" : "4711",
        "Closed" : "6677"
          CommentAdd your comment...