Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make NotifyUsers switchable to false #223

Closed
wants to merge 1 commit into from
Closed

make NotifyUsers switchable to false #223

wants to merge 1 commit into from

Conversation

0x434d53
Copy link

Since notifyUsers is true by default (https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-rest-api-3-issue-issueIdOrKey-put) it's not possible to set the notifyUsers to false if the omitempty tag is there.

@ghostsquad
Copy link
Contributor

ghostsquad commented Jul 23, 2019

Here's how you would disable user notifications:

options := &UpdateQueryOptions{
    NotifyUsers: false
}

In fact, if you don't omit this field, then by default notifyUsers will be set to false (because that's the zero-value of a boolean), instead of the "default" value in Jira (true).

EDIT: nvm, I'm an idiot.. see next comment

@ghostsquad
Copy link
Contributor

@ghostsquad
Copy link
Contributor

ghostsquad commented Jul 23, 2019

I don't think removing omitempty is the right call here, because it will turn off notifications then unless someone specifies this option explicitly.

I think the right course of action is to use a pointer to a boolean, which will then be nil, true or false, with nil being the "empty" value, which is then omitted.

@ghostsquad
Copy link
Contributor

Although this is a backward-incompatible change, I think this is acceptable, because currently using this option as is, doesn't do anything.

When you update your PR, please follow the following standards for your single commit message.

https://conventionalcommits.org/en/v1.0.0-beta.4/#summary
https://chris.beams.io/posts/git-commit/#seven-rules

an important one often missed is:
https://chris.beams.io/posts/git-commit/#imperative

Please include BREAKING CHANGE: in the commit body per the conventionalcommits, just in case anyone is interested to know what happened.

Copy link
Contributor

@ghostsquad ghostsquad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see previous comments for requested changes

@andygrunwald
Copy link
Owner

hey @0x434d53,

thanks for taking the time for this PR.
Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants