You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UpdateQueryOptions have a NotifyUsers field as a boolean. When tried to update issue with notify users set to false, it does not set it as the query parameters. Making matters worse, it will still update the issue and notify the user anyways.
What did you expect to happen?
Notify users can be set to false.
How can we reproduce it (as minimally and precisely as possible)?
funcmain() {
tp:= jira.BasicAuthTransport{
Username: "<username>",
Password: "<password>",
}
client, err:=jira.NewClient(tp.Client(), "<jira_url>")
_, resp, _:=client.Issue.UpdateWithOptions(&jira.Issue{Key: "<issue_key>"}, &jira.UpdateQueryOptions{
NotifyUsers: false,
})
fmt.Println(resp.Request.URL.Query().Encode()) // should print `notifyUsers=false` but does not print anything.
}
Anything else we need to know?
As per Jira API docs, notifyUsers defaults to true. UpdateQueryOptions accept NotifyUsers with url's tag of omitempty, makes it impossible to set notify users to false because query parser ignores it as it considered as empty value. This technically makes NotifyUsers to be useless because it will always be true regardless of the value.
What happened?
UpdateQueryOptions have a
NotifyUsers
field as a boolean. When tried to update issue with notify users set to false, it does not set it as the query parameters. Making matters worse, it will still update the issue and notify the user anyways.What did you expect to happen?
Notify users can be set to false.
How can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
As per Jira API docs,
notifyUsers
defaults totrue
.UpdateQueryOptions
acceptNotifyUsers
with url's tag ofomitempty
, makes it impossible to set notify users to false because query parser ignores it as it considered as empty value. This technically makesNotifyUsers
to be useless because it will always be true regardless of the value.Your Environment
go version
): go1.17.13 darwin/amd64The text was updated successfully, but these errors were encountered: