Modify ↓
#7994 closed task (worksforme)
how to set and action (for workflow) via xmlrpc
Reported by: | sanjay | Owned by: | osimons |
---|---|---|---|
Priority: | normal | Component: | XmlRpcPlugin |
Severity: | normal | Keywords: | |
Cc: | Olemis Lang | Trac Release: | 0.11 |
Description (last modified by )
Hi,
I cannot figure out how to change the ticket status (e.g. reassign to someone) via xmlrpc.
I am trying to use: array ticket.update(int id, string comment, struct attributes={}, boolean notify=False)
the api says: Update a ticket, returning the new ticket in the same form as getTicket(). Requires a valid 'action' in attributes to support workflow.
what should the attributes structure look like exactly? I assume a valid action would mean 'reassign'. But I cant figure out how I need to pass the parameters into the api. I hope someone can help!
I am usinc xmlrpc via c# and have a standard workflow.
accept = new,assigned,accepted,reopened -> accepted accept.operations = set_owner_to_self accept.permissions = TICKET_MODIFY leave = * -> * leave.default = 1 leave.operations = leave_status reassign = new,assigned,accepted,reopened -> assigned reassign.operations = set_owner reassign.permissions = TICKET_MODIFY reopen = closed -> reopened reopen.operations = del_resolution reopen.permissions = TICKET_CREATE resolve = new,assigned,accepted,reopened -> closed resolve.operations = set_resolution resolve.permissions = TICKET_MODIFY
Attachments (0)
Change History (2)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Mailing list would be better for "support" issues...
Anyway, the basic idea is:
ticket.getActions(int id)
to get all available actions for the ticket. The documentation for this command says: "Returns the actions that can be performed on the ticket as a list of [action, label, hints, [input_fields]] elements, where input_fields is a list of [name, value, [options]] for any required action inputs.". It will return the actions allowed by the user on the ticket in current state, and with any additional fields - like the web form does.attributes
you add'action'
, for instance'reassign'
. But, as from 1. above you would see that reassigning includes a separate input field, that field must also be added. So, the minimum attributes posted would need to be{'action': 'reassign', 'action_reassign_reassign_owner': 'osimons'}
.OK?