I’m trying to use the rest api in c# to update a Jira ticket. The ticket has a number of buttons such as Edit, Comment, Assign, More, Start Progress, Resolve Issue, Close Issue.
However I can only see the last three (Start Progress, Resolve Issue, Close Issue) when I use something like: https://jira/rest/api/2/issue/[issue-number]/transitions?expand=transitions.fields
Hi @JohnLawlor1. Welcome to the developer community forums. So, you’re seeing the available transitions for the user that’s making the API call. If you want to edit more of the fields/data related to an issue, you can use the Edit Issue API method (PUT):
Because you also mentioned comment in your post, there’s another method for that, the Add Comment API method (POST):
Sorry, i’m not completely clear on how I would select the edit button in the ticket if I can’t see it.
https://jira/rest/api/2/issue/[icket-id]/editmeta doesn’t have the ‘Edit’ button I wish to click on.
This command https://jira/rest/api/2/issue/[issue-number]/transitions?expand=transitions.fields shows me all the buttons I can interact with. For example the ‘Close Issue’ has an Id of 301, so I can use
request.Content = new StringContent(“{"transition":{"id":"301"}}”
var response = await httpClient.SendAsync(request); to update.
If I was to click the ‘Edit’ button manually, it brings up a subform, which I need to interact with.