Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ticket_search #6

Closed
ryanbentley opened this issue Dec 11, 2015 · 5 comments
Closed

ticket_search #6

ryanbentley opened this issue Dec 11, 2015 · 5 comments
Labels

Comments

@ryanbentley
Copy link

$VAR1 = {
'ErrorMessage' => 'Got no OperationType!',
'Success' => 0
};

@ewsterrenburg
Copy link
Owner

@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.

@ryanbentley
Copy link
Author

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?

@ewsterrenburg
Copy link
Owner

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.

@ryanbentley
Copy link
Author

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.

@ewsterrenburg
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants