Hi there,
I'm currently working on some C# code using the Atlassian SDK that shall read and edit project contents and some other data from a test environment, both cloud and from a local test instance. So far the reading part is done and working very nicely. Troubles start when I try to change an existing issue, changing the current state/status in particular.
What I do first is this:
I fetch all available states via Atlassian.Jira.Jira.Statuses.GetStatusesAsync();
Then on the Issue instance I try to set a new IssueStatus but when I try to call SaveChanges() on that issue it doesn't work.
I came across the method Issue.WorkflowTransitionAsync(string actionNameOrId) which I guess would finally make the ticket switch to a new status, but how do I know which actionNameOrId is the correct one?
In order to solve that issue I think I first need to get more clarity on the process itself. Therefor I'd like to ask some questions within this context and hope someone is able to answer them.
1. Is there any way to retrieve allowed states per issue type or maybe per project? I only seem to be able to get a list of all states available on the Jira instance.
2. Is setting a status even considered the right way of changing a ticket's working state or if not are transitions the right approach?
3. How are transitions and (allowed) states connected and how can I find these relationship from the API? By calling rest/api/2/issue/{issueId}/transitions?expand=transitions.fields I actually do receive a set of transitions but they dont contain any reference to any status but rather to resolutions, are the latter in any way related to status?
I think this is more an issue of understanding the business process than understanding how one would use the API's facilities and hence I tried to get answers from the documentation. While it was very useful even with examples on most topics I had no luck trying to understand the things discussed above. Should there be any reference, documentation, examples etc. please point me in the right direction. I hope this is the intended location to ask this kind of question(s), if not please correct me.
Thanks in advance, any hint is very much appreciated.