[ZBX-8859] API 'action.update' couldn't update only 'conditions' (or/and) 'operations' parameter(s) Created: 2014 Oct 07  Updated: 2017 May 30  Resolved: 2014 Oct 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.0.13, 2.2.6
Fix Version/s: 2.2.7rc1

Type: Incident report Priority: Trivial
Reporter: Fripper Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

update existing action definitions with api, 'action.update'
parameters contains only 'conditions' or 'operations'


Attachments: Text File ZBX-8859.2.0.13.patch     Text File ZBX-8859.2.2.6.patch    

 Description   

api 'action.update' fails with following message
[Cannot perform update statement on table "actions" without values.]

api call with parameters
with following pattern(s) A or B or C

A: contains only 'actionid' and 'conditions'
B: contains only 'actionid' and 'operations'
C: contains only 'actionid' and 'conditions' and 'operations'

each update pattern(s) contains no property for 'action' table, then
fails DB::update() for action table

I thought 'SQL update fails without no entities for action table'

then I create patch,
if pattern(s) A or B or C, then dummy update value for 'status' columns
with already existing record's value.



 Comments   
Comment by Fripper [ 2014 Oct 07 ]

patch for 2.0.13

Comment by Fripper [ 2014 Oct 07 ]

patch for 2.2.6

Comment by Krists Krigers (Inactive) [ 2014 Oct 08 ]

Thanks for the effort, but this problem was fixed some time ago in 2.1, released in 2.2.0. This issue will not be fixed in next 2.0.

Comment by Fripper [ 2014 Oct 10 ]

patch file - unified style

Generated at Sun Apr 06 17:57:08 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.