How to change transitions to a issue in ruby, using jira-ruby gem? -


I am trying to use cumin in ruby ​​with Jira-Rabi Mani (), but I do not know How can I change the transition by using it only REST-api?

There is a transition class (), but I do not know how to deal with it.

You say that you / issue / {issueIdOrKey} / transitions The situation is said to move from one position to another.

First get the transition available to a problem:

  client = JIRA :: Client.new (...) Problem = client.Issue.find ("PROJECT -123 ") available_transitions = client.Transition.all (: issue = & gt; issued) available_transitions.each {| Ea | Now you have the names and ID of the possible changes. "# {Ea.name} (id # {ea.id})" " 

Store the ID of the transition you make, then use this to save a new transition for this issue:

  transition_id = ... transition = issue.transitions.build transition.save ! ("Infection" = & gt; {"id" = & gt; transition_id})   

I had to check the docs some times to understand that the POST transition required for the call Payload was done and then using the Ruby Client syntax to get that payload, using a device like Bella made it easy.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -