I am trying to fetch the request, update some parameters such as labels, assignee etc and push the same ticket i.e update it?
How do i do that in golang?
Found my way here looking for an answer, ended up looking through the existing test cases.
I assume it's something like this you want to do?
func TestIssueService_Update(t *testing.T) {
setup()
defer teardown()
testMux.HandleFunc("/rest/api/2/issue/PROJ-9001", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPut)
testRequestURL(t, r, "/rest/api/2/issue/PROJ-9001")
w.WriteHeader(http.StatusNoContent)
})
i := &Issue{
Key: "PROJ-9001",
Fields: &IssueFields{
Description: "example bug report",
},
}
issue, _, err := testClient.Issue.Update(context.Background(), i, nil)
if issue == nil {
t.Error("Expected issue. Issue is nil")
}
if err != nil {
t.Errorf("Error given: %s", err)
}
}
Hi @Kaushik Kampli ,
Did you check this documentation: https://pkg.go.dev/github.com/andygrunwald/go-jira#section-readme?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kaushik - Welcome to the Atlassian Community!
I am not completely following what your need is. Can you provide more details about what you are trying to do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying to modify the ticket from slack using slash commands.
Using go for the Rest purposes.
So I just need a way to do PUT operation to update the ticket(SLA, assignee, labels) etc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.