Closed ryanbentley closed 8 years ago
@ryanbentley: Could you please provide a little more elaboration about this issue please... What request are you trying to perform? Against what version of OTRS? Etc.
Nevermind. I've sorted it out - my connector was incorrectly configured.
I have another question though:
EG: client.ticket_get(ticketid, get_articles=True).articles()[0]
How do I get the body of an article?
Similar to the attributes of a ticket itself, the 'attrs' attribute of an article provides you with a dictionary of its attributes. For example:
ticket = client.ticket_get(ticketid, get_articles=True) article = ticket.articles()[0] body = article.attrs['Body']
Easiest way to view the names of all available attributes is to play around with the result of a TicketGet operation in an (i)python terminal.
Is it possible to create a ticket, as an agent, but forcing it as if it was created by a user?
I'm trying to allow users to create tickets via my interface without otrs being tied into my user DB, so ideally I'd like to use client.user_session_register with agent credentials, but create a ticket like so:
Ticket(CustomerUser=current_user.email)
Or something similar.
I don't fully grasp what exactly you are trying to accomplish... Of course you can create a ticket while logging in as an agent and set the CustomerUser as an attribute while creating the ticket (as documented in http://otrs.github.io/doc/manual/admin/4.0/en/html/genericinterface.html#generic-ticket-connector).
Actually the readme here contains the exact same thing.
If you are trying to accomplish something functionally different, I guess the OTRS mailinglist (https://groups.google.com/forum/#!forum/otrs_archive) is a better place to find out if what you want is supported by the soap interface / generic ticket connector and how this request should look like.
If I'm not overlooking something, the whole functionality for a TicketCreate for the generic interface is supported by this module.
$VAR1 = { 'ErrorMessage' => 'Got no OperationType!', 'Success' => 0 };