Questions for Confluence license has expired.

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

State mapping

 
1
0
-1

State mapping

I am having problems with the following scenario:

I have a connection with two different workflows. In which flow one has "n" states that are mapped against a single state of flow b, called "test". In addition to this, of the "n" states of flow "a" one of them is called "test".

Something like this:

flow "a" - flow "b"
"State 1" - "test".
"State 2" - "test
"State 3" - "test
"test" - "test".

My problem is when the synchronization is generated - by a comment or another field - from the flow "b" and it is in the state "test" but in the flow "a" it is in another state - for example State 1 - and there is in the flow "a" a transition that connects State 1 with test.

If this case is generated, the ticket that is in the flow "a" changes the state to "test" by the state mapping of the connection.

Do you have any recommendation that does not implement changes in the workflow?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Harold,

      I resolved state mapping by changing status depended on status on both sides.

      example:


      if(replica.status.name == "In Progress" && issue.status.name == "Open")
          {issue.setStatus("In Progress"); }
      else if(replica.status.name == "To Be Deployed" && issue.status.name == "In Progress")
          {issue.setStatus("Deployment"); }
      else if(replica.status.name == "In Progress" && issue.status.name == "Deployment")
          {issue.setStatus("In Progress"); }
      else if(replica.status.name == "In Progress" && issue.status.name == "Blocked")
          {issue.setStatus("In Progress"); }
      else if(replica.status.name == "Blocked" )
          {issue.setStatus("Blocked"); }


      Regards Peter

        CommentAdd your comment...