External Link from OTRS to a personal page

Moderator: crythias

Locked
mathieu
Znuny newbie
Posts: 4
Joined: 08 Jul 2011, 14:32
Znuny Version: 3.0.8

External Link from OTRS to a personal page

Post by mathieu »

Hi guys, my name is Mat and I'm a french engineer who try to use (as well as possible) OTRS.
First, i want to underline that I haven't any experience using PERL script and this language is absolutely out of my knowledges.

About OTRS, I would like to add a link into OTRS which redirect me on a PHP page (on my server). I added a piece of code into AgentTicketZoom to add a link near "SPLIT" button in a ticket.
The new button correctly appears but actually, the "link" isn't working.

Here's a paste of the code I added :

Code: Select all

$Self->{LayoutObject}->Block(
            Name => 'ArticleMenu',
            Data => {
                 %Ticket, %Article, %AclAction,
                Description => 'RMA',
                Name        => 'RMA',
                Link 		=> 'http://www.mypage.fr/rma.php?ticket=$Data{"TicketID"}'
            },
     );
Obviously, when I click on this link, i'm redirect to http://192.168.5.5/otrs/index.pl?http:/ ... ?ticket=13 and not to http://www.mypage.fr/rma.php?ticket=13

Can you provide me a little help or a solution ?
Thank you so much guys !

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

Re: External Link from OTRS to a personal page

Post by crythias »

You should be able to simply enter that link code in HTML on the appropriate .dtl page
maybe CustomerTicketMessage.dtl or ... wherever
<a href=".......">link text</a>
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
mathieu
Znuny newbie
Posts: 4
Joined: 08 Jul 2011, 14:32
Znuny Version: 3.0.8

Re: External Link from OTRS to a personal page

Post by mathieu »

I got it ! I didn't notice that a folder contained all .dtl which are used to generate each part of a page.

Thank you.
mathieu
Znuny newbie
Posts: 4
Joined: 08 Jul 2011, 14:32
Znuny Version: 3.0.8

Re: External Link from OTRS to a personal page

Post by mathieu »

Just another question (I hope it will be the last one...)

I would like to include the CustomerID into my link.

But the following code doesn't work :
<a class="OpenTicket" href="http://www.mypage.fr/rma.php?id=$QData{"CustomerID"}" >Generate a RMA</a>
It may be due to a bad syntax (I just copy/paste an example in an other source code, but it does not work in my case). Thank you for helping me, I'm such a dumb in PERL !
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: External Link from OTRS to a personal page

Post by MichaelR »

Only thing I can think of is it needs to be inside the appropriate dtl block? The syntax looks fine. Which .dtl are you using?
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
mathieu
Znuny newbie
Posts: 4
Joined: 08 Jul 2011, 14:32
Znuny Version: 3.0.8

Re: External Link from OTRS to a personal page

Post by mathieu »

Yes, maybe I use this variable into an inappropriate dtl file.

I put my code into AgentCustomerTableView.dtl.
When I'm viewing a ticket, my link "Generate a RMA" correctly appears under "Maps" and "Opened tickets" in the box at the bottom-right :
Image
But the link is "http://www.mypage.fr/rma.php?id=" (it doesn't not include customer ID)

Thanks !
azimut
Znuny newbie
Posts: 3
Joined: 30 May 2012, 16:26
Znuny Version: 3.1.5
Real Name: Eugene
Company: LinuxWizard

Re: External Link from OTRS to a personal page

Post by azimut »

Identical problem. OTRS 3.1.6
How without being the programmer skill force OTRS to transfer value CustomerID in AgentCustomerTableView.dtl?!
I tried to write code in LayoutTicket.pm, but was fail. No any decision on forum for primitive and standard integration task.
Idiocy system..
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: External Link from OTRS to a personal page

Post by crythias »

In 3.0:
Edit Config Settings in Ticket -> Core::TicketFreeText
TicketFreeText1::Link
defautl: http://some.example.com/handle?query=$L ... tFreeText1"}
Maybe try: http://some.example.com/handle?query=$L ... CustomerID"}
In 3.0 Docs, it's listed as
TicketFreeText1::Link

Description Value
Description: Defines the http link for the free text field number 1 for tickets (it will be used in every ticket view).
Group: Ticket
SubGroup: Core::TicketFreeText
Valid: 0
Required: 0
Config-Setting:
$Self->{'TicketFreeText1::Link'} = 'http://some.example.com/handle?query=$L ... tFreeText1"}';
In 3.1 docs it's in dynamic fields.
Search for:
Text Dynamic Field Configuration
Text dynamic field is used to store a single line string.
Text dynamic field settings:
Default value: Optional.
This is the value to be shown by default in the edit screens (like New Phone Ticket or Ticket Compose).
Show link: Optional.
If set, the field value will be converted into a clickable link for display screens (like ticket zoom or overviews).
For example, if "Show link" is set to "http://www.otrs.com", clicking on the filled value will make your browser to open the OTRS web page.
Note
The use of $LQData{"NameX"} in the Set link value, where NameX is the name of the field will add the field value as part of the link reference.
Hint: "But how do I make a permanent link that the user doesn't fill in?"
Start by looking at DefaultValue. or just use a href= ... in the dtl
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
azimut
Znuny newbie
Posts: 3
Joined: 30 May 2012, 16:26
Znuny Version: 3.1.5
Real Name: Eugene
Company: LinuxWizard

Re: External Link from OTRS to a personal page

Post by azimut »

In my OTRS 3.1.5 TextDynamicField work anywhere except in Customer Information.

It's much easier! Go to SysConfig: Framework -> Frontend::Customer
Activated and edit field "Frontend::CustomerUser::Item###3-XING" (Xing do not need more than):
Base1.jpg
Base2.jpg
Enjoy!
You do not have the required permissions to view the files attached to this post.
Locked