HTTP GET Commands to Fill fields with values

Moderator: crythias

Locked
oscarferreira1
Znuny newbie
Posts: 6
Joined: 05 Jul 2012, 16:43
Znuny Version: 3.1.6

HTTP GET Commands to Fill fields with values

Post by oscarferreira1 »

Hello,

I would like to know if it is possible to open a new ticket with certain values filled in automaticaly?
These new values would come from data inserted in the URL that invokes creation of new Tickets.
Example: http://otrs-demo.otrs.com/otrs/index.pl ... merID=4711

Thank you in advance.
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: HTTP GET Commands to Fill fields with values

Post by reneeb »

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
oscarferreira1
Znuny newbie
Posts: 6
Joined: 05 Jul 2012, 16:43
Znuny Version: 3.1.6

Re: HTTP GET Commands to Fill fields with values

Post by oscarferreira1 »

Hello reneeb,

Thank you for your quick reply, this seems to be a way to view the URL needed to place information into a new ticket using HTTP Get arguments.
Yet I am having trouble using this url:

Code: Select all

http://localhost:8081/otrs/index.pl?Action=AgentTicketPhone;Subaction=StoreNew;ExpandCustomerName=2;Subject=Example+Subject;Dest=1%7C%7CPostmaster;NextStateID=4;TimeUnits=5;Body=%3Cstrong%3E%3Cspan+style%3D%22color%3A+rgb%28255%2C+0%2C+0%29%3B%22%3EMy+bonnie+is+over+the+ocean%3C%2Fspan%3E%3C%2Fstrong%3E%2C+%3Cspan+style%3D%22color%3A+rgb%28230%2C+230%2C+250%29%3B%22%3E%3Cspan+style%3D%22background-color%3A+rgb%280%2C+0%2C+255%29%3B%22%3Emy+bonnie+is+over+the+sea%3C%2Fspan%3E%3C%2Fspan%3E%2C+%3Cspan+style%3D%22color%3A+rgb%280%2C+128%2C+0%29%3B%22%3E%3Cspan+style%3D%22font-size%3A+16px%3B%22%3E%3Cspan+style%3D%22font-family%3A+Comic+Sans+MS%2Ccursive%3B%22%3E%3Cem%3E%3Cu%3Eoh+bring+back+my+bonnie+to+me%3C%2Fu%3E%3C%2Fem%3E%3C%2Fspan%3E%3C%2Fspan%3E%3C%2Fspan%3E!%3Cbr+%2F%3E%0D%0A 
It gives me a OTRS error message

Code: Select all

Backend ERROR: OTRS-CGI-10 Perl: 5.12.3 OS: MSWin32 Time: Mon Jan 7 10:40:32 2013 Message: Invalid Challenge Token! Traceback (1864): Module: Kernel::Output::HTML::Layout::ChallengeTokenCheck (v1.381.2.5) Line: 1132 Module: Kernel::Modules::AgentTicketPhone::Run (v1.47) Line: 713 Module: Kernel::System::Web::InterfaceAgent::Run (v1.64) Line: 868 Module: ModPerl::ROOT::ModPerl::Registry::C_3a_Program_20Files_OTRS_OTRS_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 49 Module: (eval) (v1.90) Line: 204 Module: ModPerl::RegistryCooker::run (v1.90) Line: 204 Module: ModPerl::RegistryCooker::default_handler (v1.90) Line: 170 Module: ModPerl::Registry::handler (v1.99) Line: 31
Can you help me?
Thank you.
oscarferreira1
Znuny newbie
Posts: 6
Joined: 05 Jul 2012, 16:43
Znuny Version: 3.1.6

Re: HTTP GET Commands to Fill fields with values

Post by oscarferreira1 »

Anyone?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: HTTP GET Commands to Fill fields with values

Post by crythias »

Please describe the workflow that what you request helps to accomplish.
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
oscarferreira1
Znuny newbie
Posts: 6
Joined: 05 Jul 2012, 16:43
Znuny Version: 3.1.6

Re: HTTP GET Commands to Fill fields with values

Post by oscarferreira1 »

Hello,

I wish to place an URL with enough information that when executed will open the new ticket form with data already filled in.
The Template creation example I was trying was not working giving me error when executing the newly created option: Image
In Summary: I wish to know how to add Get arguments to the new ticket URL so that form information may be filled in automaticaly.
thank you!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: HTTP GET Commands to Fill fields with values

Post by crythias »

what's the source of the data? If it's static, you can use sysconfig to prepopulate much of it. If it's based upon ... something else? you can use the template approach to press a button and fill the fields once you're on the page.
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
oscarferreira1
Znuny newbie
Posts: 6
Joined: 05 Jul 2012, 16:43
Znuny Version: 3.1.6

Re: HTTP GET Commands to Fill fields with values

Post by oscarferreira1 »

The sysconfig way isn't working well for me.. as you can see in my initial posts... can you help me Crythias?

Thank you!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: HTTP GET Commands to Fill fields with values

Post by crythias »

oscarferreira1 wrote:The sysconfig way isn't working well for me.. as you can see in my initial posts...
I don't see how sysconfig isn't working.
I don't know the source of your data.
I don't know whether you need static information in the fields or dynamic based upon something.
I don't know why the press a button to fill the fields isn't good enough.
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
oscarferreira1
Znuny newbie
Posts: 6
Joined: 05 Jul 2012, 16:43
Znuny Version: 3.1.6

Re: HTTP GET Commands to Fill fields with values

Post by oscarferreira1 »

crythias wrote:
oscarferreira1 wrote:The sysconfig way isn't working well for me.. as you can see in my initial posts...
I don't see how sysconfig isn't working.
I don't know the source of your data.
I don't know whether you need static information in the fields or dynamic based upon something.
I don't know why the press a button to fill the fields isn't good enough.
Good Morning,

I went through the tutorial given by reneeb, and the result was an error on selecting the new menu option.
The arguments I am giving to the sysconfig option are in my first replies.
The information may be dynamic.. that is why I would like to know the URL based statement I can use to just have a program generate the URL and have the user click the link and view the newly populated ticket rwady to be created.
The link may be external to OTRS this is why the other two situations are not the perfect way we would like to go.
Can you help?
Locked