New field on Ticket

Moderator: crythias

Locked
serambca
Znuny newbie
Posts: 26
Joined: 27 Sep 2016, 11:27
Znuny Version: 5.0.13
Real Name: Sergio Ambrosio

New field on Ticket

Post by serambca »

Hi to everyone,

I need to add a new functonality into my OTRS. Let me explain...
I need to add a "label" that I can put for example "PEP_3302", and when I click on this, show me all tickets that contains "PEP_3302".

Is complicated? I think with Dynamic Fields I can do it, but I don't know how to start...

If someone have any idea, I am open mind ;)

Regards,
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: New field on Ticket

Post by reneeb »

Why not use the toolbar module for the fulltext search?

Or use a search profile (but every agent has to create that search profile, there are no global search profiles when you do not use a commercial addon).+

If those possible solutions do not fit your needs, you have to describe your goal more detailed:

Where does the "label" should appear? (Toolbar, ticket overviews, navigation bar, ...)
What should be searched? (fulltext search, dynamic field, ...)
...

Then you can search for parts in OTRS that do similar things and try to change the code...
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
serambca
Znuny newbie
Posts: 26
Joined: 27 Sep 2016, 11:27
Znuny Version: 5.0.13
Real Name: Sergio Ambrosio

Re: New field on Ticket

Post by serambca »

HI to everyone!,

I found a little solution but I need your help to finish ;)

I just created Dynamic Field with the name of the label and add the value on the following fields on SysAdmin:

Frontend::Agent::Ticket::ViewFreeText
Frontend::Agent::Ticket::ViewSearch

Firstable, in ViewFreeText, add the dynamic field to add the information.
Secondly, in ViewSearch I can use the search to find the data.

I need only one more thing, I need when I click on the label ( Menu Information ), automatically run a search with the value contains:

For example:

Task Reference : PEP_001

When I clic on PEP_001 show me the ALL tickets with have this Task Reference.

I started modified Dynamic Field "Show link" but don't work the module search. ( I need to find the sentence to get a search with value in TaskRefence)

For example : http://xxx.xxx.xxx.xxx/otrs/handle?query=[%Data.TaskReference%]

Someone can help me?

Regards,
serambca
Znuny newbie
Posts: 26
Joined: 27 Sep 2016, 11:27
Znuny Version: 5.0.13
Real Name: Sergio Ambrosio

Re: New field on Ticket

Post by serambca »

I found the solution with this code :

Code: Select all

index.pl?Action=AgentTicketSearch;Subaction=Search;ShownAttributes=LabelSearch_DynamicField_NameDynamicField;Search_DynamicField_NameDynamicField=[% Data.NameDynamicField | uri %]
For me is solved ;)

Thanks at all!
Locked