Dynamic Fields in Events

Moderator: crythias

Post Reply
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Dynamic Fields in Events

Post by steeman »

I want to do something everytime a Ticket is created.
I see that the following events are triggered (in front: the times it is triggered).
1 ArticleAutoResponse (dynamicfield info present)
2 ArticleCreate (dynamicfield info present)
2 ArticleFlagSet (dynamicfield info present)
1 ArticleSend (dynamicfield info present)
8 HistoryAdd (no dynamicfield info present)
1 TicketCreate (no dynamicfield info present)
1 TicketCustomerUpdate (no dynamicfield info present)

In not all these events I can get the dynamicfield info via (see comment above)
%Ticket = $Self->{TicketObject}->TicketGet(
TicketID => $Param{Data}->{TicketID},
UserID => $Param{UserID},
DynamicFields => 1,
);

What is the most logical event to:
1) catch only a new ticket creation
2) got the dynamicField values

Philip
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Dynamic Fields in Events

Post by reneeb »

Wait for a ArticleCreate and check that it is the first article of the ticket...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Dynamic Fields in Events

Post by crythias »

https://otrsteam.ideascale.com/a/dtd/Ad ... 4853-10369

Check articlecreate and see how many articles (1) are attached to the ticket.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: Dynamic Fields in Events

Post by steeman »

How can I count the number of articles in a ticket? I search the API, but I can't find it.

Philip
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Dynamic Fields in Events

Post by reneeb »

see ArticleIndex in Article.pm http://otrs.perl-services.de/docs/otrs/ ... ticle.html (all the article methods are methods of the ticket object).
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
steeman
Znuny newbie
Posts: 67
Joined: 22 May 2013, 11:35
Znuny Version: 3.3.2
Real Name: Philip Steeman
Company: VIVES

Re: Dynamic Fields in Events

Post by steeman »

That's it

Thanks

Philip
Post Reply