[ZBX-12991] maintenance.create ignores defaults Created: 2017 Nov 06  Updated: 2024 Apr 10  Resolved: 2017 Dec 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 3.0.11
Fix Version/s: 3.0.15rc1, 3.4.6rc1, 4.0.0alpha2, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Raymond Kuiper Assignee: Ivo Kurzemnieks
Resolution: Fixed Votes: 0
Labels: api, maintenance, regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Team: Team B
Team: Team B
Sprint: Sprint 20, Sprint 21, Sprint 22, Sprint 23, Sprint 24
Story Points: 0.25

 Description   

According to documentation, the maintenance.create method should uphold these parameters as default when creating a new maintenance:

active_since timestamp Time when the maintenance becomes active. Default: current time.

active_till timestamp Time when the maintenance stops being active.
Default: the next day.

See https://www.zabbix.com/documentation/3.0/manual/api/reference/maintenance/object

However, when trying to create a new maintenance via the API without specifying active_since and active_till, the API fails with one of the following errors:

"Active since" must be between 1970.01.01 and 2038.01.18.
"Active till" must be between 1970.01.01 and 2038.01.18.



 Comments   
Comment by Oleksii Zagorskyi [ 2017 Nov 08 ]

I can confirm a change in 2.4, where these fields became not optional.
In 2.2 it worked fine to not specify the fields.

Comment by Ivo Kurzemnieks [ 2017 Nov 09 ]

(1) No translation string changes.

vmurzins CLOSED

Comment by Ivo Kurzemnieks [ 2017 Nov 09 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-12991

Comment by Larisa Grigorjeva [ 2017 Nov 13 ]

(2) As discussed with sasha "active_since" and "active_till" should be mandatory fields in all cases, without default values. Documentation needs to be changed.

iivs API documentation updated:

RESOLVED

vmurzins Documentation still contains default value for "active_since" and "active_till". Please, remove it.

REOPENED

iivs RESOLVED

vmurzins CLOSED

Comment by Ivo Kurzemnieks [ 2017 Dec 28 ]

Fixed in:

  • pre-3.0.15rc1 r76400
  • pre-3.4.6rc1 r76403
  • pre-4.0.0alpha2 (trunk) r76404
Comment by Ivo Kurzemnieks [ 2017 Dec 28 ]

(4) [D] API documentation updated:

sasha CLOSED

Generated at Sat Apr 20 16:47:57 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.