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

service: auto_resolve_timeout & acknowledgement_timeout cannot be set to null #51

Closed
heimweh opened this issue Nov 4, 2016 · 2 comments

Comments

@heimweh
Copy link
Contributor

heimweh commented Nov 4, 2016

Hi,

It seems like the API allows the JSON value null (tested it via https://v2.developer.pagerduty.com/v2/page/api-reference#!/Services/put_services_id) to be passed which would disable the auto_resolve_timeout (as well as acknowledgement_timeout and possibly others) but it doesn't seem like the client library support it yet.

Here's a screenshot:
screen shot 2016-11-04 at 13 26 45

I'd be happy to help out on this one but not quite sure where to start.

@ranjib
Copy link
Contributor

ranjib commented Nov 7, 2016

@heimweh current implementation uses an uint pointer https://github.com/PagerDuty/go-pagerduty/blob/master/service.go#L62 for the service struct. If you remove "omitempty" from the annotation of AutoResolveTimeout field, I think that will solve your use case.

@heimweh
Copy link
Contributor Author

heimweh commented Nov 16, 2016

@ranjib: thanks for looking into this. I'll take a look and see if I can get this to work. I think we need to cover three use cases though.

  1. Use API defaults by just omitting the fields
  2. Disable the timeouts by passing empty("null") fields
  3. User-defined timeouts

Is this something we want or do we want to just handle user-defined timeouts or have them disabled?

@heimweh heimweh closed this as completed Jan 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants