[SOLVED] How to search with URL code

Moderator: crythias

Post Reply
gyarakilaszlo
Znuny newbie
Posts: 6
Joined: 15 Jun 2015, 19:56
Znuny Version: 5.0.17
Real Name: Laszlo Gyaraki
Company: OTRS-megoldások
Location: Hungary/Budapest
Contact:

[SOLVED] How to search with URL code

Post by gyarakilaszlo »

Hi All,

If I want to search a 2016 ticket with Firefox browser, the following URL appears: https://otrs.lan/otrs/index.pl?Action=A ... mber=2016*

From the above example I think that it is also possible to search for dynamic field content, and I would like to set it in the DF show link parameter with this:

Code: Select all

https://otrs.lan/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;DynamicField_Version=[% Data.Version | uri %]
However, this setting is not a good solution as all the tickets appear, not only those which are true for the DF value.

Thank you for your assistance in advance.
Last edited by gyarakilaszlo on 23 Nov 2016, 12:16, edited 2 times in total.
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: How to search with URL code

Post by reneeb »

gyarakilaszlo wrote:Hi All,

If I want to search a 2016 ticket with Firefox browser, the following URL appears: https://otrs.lan/otrs/index.pl?Action=A ... umber=2016*

From the above example I think that it is also possible to search for dynamic field content, and I would like to set it in the DF show link parameter with this: https://otrs.lan/otrs/index.pl?Action=A ... d_Version=[% Data.Version | uri %]

However, this setting is not a good solution as all the tickets appear, not only those which are true for the DF value.

Thank you for your assistance in advance.

Code: Select all

https://otrs.lan/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;ShownAttributes=LabelSearch_DynamicField_Version;Search_DynamicField_Version=<whatever_you_want>
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
gyarakilaszlo
Znuny newbie
Posts: 6
Joined: 15 Jun 2015, 19:56
Znuny Version: 5.0.17
Real Name: Laszlo Gyaraki
Company: OTRS-megoldások
Location: Hungary/Budapest
Contact:

Re: How to search with URL code

Post by gyarakilaszlo »

reneeb wrote:

Code: Select all

https://otrs.lan/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;ShownAttributes=LabelSearch_DynamicField_Version;Search_DynamicField_Version=<whatever_you_want>
Hi Renée,
thank You so much for the really fast reply! The code really works!
serambca
Znuny newbie
Posts: 26
Joined: 27 Sep 2016, 11:27
Znuny Version: 5.0.13
Real Name: Sergio Ambrosio

Re: [SOLVED] How to search with URL code

Post by serambca »

Hi to everyone,

I need to search with url and the code I can't get work...

https://otrs.lan/otrs/index.pl?Action=A ... r_you_want>

I have a Dynamic Field named TaskReference and I would like to search for example PEP_001.

I put the next code:

https://otrs.lan/otrs/index.pl?Action=A ... on=PEP_001

Is it correct? Someone help me?
gyarakilaszlo
Znuny newbie
Posts: 6
Joined: 15 Jun 2015, 19:56
Znuny Version: 5.0.17
Real Name: Laszlo Gyaraki
Company: OTRS-megoldások
Location: Hungary/Budapest
Contact:

Re: [SOLVED] How to search with URL code

Post by gyarakilaszlo »

Hi serambca,

try the next code:

Code: Select all

index.pl?Action=AgentTicketSearch;Subaction=Search;ShownAttributes=LabelSearch_DynamicField_TaskReference;Search_DynamicField_TaskReference=[% Data.TaskReference | uri %]
serambca
Znuny newbie
Posts: 26
Joined: 27 Sep 2016, 11:27
Znuny Version: 5.0.13
Real Name: Sergio Ambrosio

Re: [SOLVED] How to search with URL code

Post by serambca »

With this PERFECT!

Thanks!!!!
gyarakilaszlo
Znuny newbie
Posts: 6
Joined: 15 Jun 2015, 19:56
Znuny Version: 5.0.17
Real Name: Laszlo Gyaraki
Company: OTRS-megoldások
Location: Hungary/Budapest
Contact:

Re: [SOLVED] How to search with URL code

Post by gyarakilaszlo »

serambca wrote:With this PERFECT!

Thanks!!!!
not for me, but for reneeb :)
Agent123
Znuny newbie
Posts: 2
Joined: 14 Nov 2016, 16:48
Znuny Version: OTRS 5.0
Real Name: Klaus Mann
Company: FED

Re: [SOLVED] How to search with URL code

Post by Agent123 »

I would also like to thank. That works great!
I have the URL in the configuration of the DynamicField here: "Show Link". This allows the agent to search directly from the "ticket information" all tickets that have the same value. But this works only for DynamicFields with field type = "Text".
But how does the URL look at field type = "simple selection"? There must be a difference !?
Does anyone know the answer?
Post Reply