[ZBX-6668] cannot update action conditions alone Created: 2013 Jun 06  Updated: 2017 May 30  Resolved: 2013 Jun 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 2.0.6
Fix Version/s: 2.1.0

Type: Incident report Priority: Minor
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: api
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

{"jsonrpc":"2.0","method":"action.update","params":{"actionid":"4","conditions":[

{"conditiontype":15,"operator":0,"value":"1"}

,

{"conditiontype":15,"operator":0,"value":"3"}

]},"auth":"98e183c2503c4dc192285c604bac443d","id":1}

{"jsonrpc":"2.0","error":

{"code":-32500,"message":"Application error.","data":"Cannot perform update statement on table \"actions\" without values."}

,"id":1}

apparently this was only caught by the sanity check before messing up the db... updating conditions separate from action properties should work just fine



 Comments   
Comment by Oleg Egorov (Inactive) [ 2013 Jun 07 ]

FIXED IN svn://svn.zabbix.com/branches/dev/ZBX-6668 r36172

Comment by Eduards Samersovs (Inactive) [ 2013 Jun 10 ]

Tested!

Comment by Oleg Egorov (Inactive) [ 2013 Jun 10 ]

FIXED IN 2.1.0(trunk) r36201
CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jun 11 ]

(1) The same problem exists when updating only operations. Here's an example request:

{
    "jsonrpc": "2.0",
    "method": "action.update",
    "params": {
        "actionid": "3",
        "operations": [
            {
                "operationtype": 0,
                "esc_period": 0,
                "esc_step_from": 1,
                "esc_step_to": 2,
                "evaltype": 0,
                "opmessage_grp": [
                    {
                        "usrgrpid": "7"
                    }
                ],
                "opmessage": {
                    "default_msg": 1,
                    "mediatypeid": "1"
                }
            }
        ]
    },
    "id": 9,
    "auth": "d283edc91f1ef8f40d361bb28ac636a2"
}

oleg.egorov RESOLVED IN r36226

jelisejev CLOSED.

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jun 11 ]

Please mind the sortorder and the formatting in the changelog https://www.zabbix.com/documentation/2.2/manual/api/changes_2.0_-_2.2?do=diff

oleg.egorov Thanks, CLOSED

Comment by Pavels Jelisejevs (Inactive) [ 2013 Jun 11 ]

TESTED.

Comment by Oleg Egorov (Inactive) [ 2013 Jun 11 ]

FIXED IN 2.1.0(trunk) r36247
CLOSED

Generated at Wed Apr 24 19:07:00 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.