Url encoding

I have a template which provides a link to our survey tool and recently I was asked to add subject to the parts included in the url.

Since the ticket subject contains spaces, etc. that may not lend them selves to a url

I found a way to handle spaces but then I get a subject with a # sign which creates a short circuited subject value

Below are 2 options with the ending part(in red) differs.

The first one works but only handles spaces.

The second one would be wholistic but RT does not like the syntax. Any ideas?

Thanks

Joe

  1. If you agree your issue is resolved, please give us feedback on your experience by completing a brief satisfaction survey:

https://umbc.us2.qualtrics.com/SE/?SID=SV_etfDUq3MTISF6Ly&groupid=ITNM&ticketid={$Ticket->Id}&ticketowner={$Ticket->OwnerObj->EmailAddress}&customeremail={$Ticket->RequestorAddresses}&ticketsubject={$Ticket->Subject=~ s/\s/%20/gr}

  1. If you agree your issue is resolved, please give us feedback on your experience by completing a brief satisfaction survey:

https://umbc.co1.qualtrics.com/SE/?SID=SV_4IbNK0n1unOaIEB&groupid=BSG&ticketid={$Ticket->Id}&ticketowner={$Ticket->OwnerObj->EmailAddress}&customeremail={$Ticket->RequestorAddresses}&ticketsubject={uri_escape($Ticket->Subject)}

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu

Le 22/06/2016 � 01:16, Joe Kirby a �crit :

I have a template which provides a link to our survey tool and recently
I was asked to add subject to the parts included in the url.

Since the ticket subject contains spaces, etc. that may not lend them
selves to a url

I found a way to handle spaces but then I get a subject with a # sign
which creates a short circuited subject value

Below are 2 options with the ending part(in red) differs.

The first one works but only handles spaces.

The second one would be wholistic but RT does not like the syntax. Any
ideas?

you can use:

{use URI::Escape; uri_escape($Ticket->Subject);}

or any other perl module that does the same.

https://umbc.co1.qualtrics.com/SE/?SID=SV_4IbNK0n1unOaIEB&groupid=BSG&ticketid={$Ticket->Id}&ticketowner={$Ticket->OwnerObj->EmailAddress}&customeremail={$Ticket->RequestorAddresses}&ticketsubject={uri_escape($Ticket->Subject)}

I would use the /Elements/QueryString RT component here, which will do
all the funny URI encoding and parameter concatenation for you:

{
my $query_string = $m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}

https://umbc.co1.qualtrics.com/SE/?{$query_string}

Chris

Le 22/06/2016 � 10:48, Christian Loos a �crit :

https://umbc.co1.qualtrics.com/SE/?SID=SV_4IbNK0n1unOaIEB&groupid=BSG&ticketid={$Ticket->Id}&ticketowner={$Ticket->OwnerObj->EmailAddress}&customeremail={$Ticket->RequestorAddresses}&ticketsubject={uri_escape($Ticket->Subject)}

I would use the /Elements/QueryString RT component here, which will do
all the funny URI encoding and parameter concatenation for you:

{
my $query_string = $m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}

https://umbc.co1.qualtrics.com/SE/?{$query_string}

Nice idea, but is $m available in RT templates (never tried) ?

Nice idea, but is $m available in RT templates (never tried) ?

You are right, you must replace line

my $query_string = $m->comp(‘/Elements/QueryString’,

with

my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

Chris

Thank you both.

It does do a great job of translating however it does not seem the field is actually available for the command line

Here is the full template and then the email result. Am I missing a comma or something?

TEMPLATE--------
RT-Attach-Message: Yes

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

{$Transaction->Content()}

If you agree your issue is resolved, please give us feedback on your experience by completing a brief satisfaction survey:

{
my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}
https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

If you believe your issue has not been resolved, please respond to this message, which will reopen your ticket. Note: A full record of your request can be found at:

Ticket <URL: {RT->Config->Get(‘WebURL’)}Ticket/Display.html?id={$Ticket->id} >

Thank You
——————————

Email result from TEMPLATE

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

This transaction appears to have no content

If you agree your issue is resolved, please give us feedback on your experience by completing a brief satisfaction survey:

SID=SV_4IbNK0n1unOaIEB&customeremail=jkirby%40umbc.edu http://40umbc.edu/&groupid=BSG&ticketid=706954&ticketsubject=Test%20Case%23%201234
https://umbc.co1.qualtrics.com/SE/?$query_string https://umbc.co1.qualtrics.com/SE/?$query_string

If you believe your issue has not been resolved, please respond to this message, which will reopen your ticket. Note: A full record of your request can be found at:

Ticket <URL: https://rt.umbc.edu/Ticket/Display.html?id=706954 https://rt.umbc.edu/Ticket/Display.html?id=706954 >

Thank You

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu> On Jun 22, 2016, at 5:12 AM, Christian Loos cloos@netcologne.de wrote:

Am 22.06.2016 um 10:59 schrieb Emmanuel Lacour:

Nice idea, but is $m available in RT templates (never tried) ?

You are right, you must replace line

my $query_string = $m->comp(‘/Elements/QueryString’,

with

my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

Chris

OK, my fault :wink:

Change

my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

to this (note the ‘s’)

my $query_string = $HTML::Mason::Commands::m->scomp(‘/Elements/QueryString’,

and this

https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

should be this (no quotes)

https://umbc.co1.qualtrics.com/SE/?{$query_string}

ChrisAm 22.06.2016 um 12:40 schrieb Joe Kirby:

Thank you both.

It does do a great job of translating however it does not seem the field
is actually available for the command line

Here is the full template and then the email result. Am I missing a
comma or something?

TEMPLATE--------
RT-Attach-Message: Yes
Subject: {$Ticket->Subject} [RESOLVED]

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

{$Transaction->Content()}


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

{
my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}
https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL:
{RT->Config->Get(‘WebURL’)}Ticket/Display.html?id={$Ticket->id} >

Thank You
����������

Email result from TEMPLATE

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

This transaction appears to have no content


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

SID=SV_4IbNK0n1unOaIEB&customeremail=jkirby%40umbc.edu
http://40umbc.edu&groupid=BSG&ticketid=706954&ticketsubject=Test%20Case%23%201234
https://umbc.co1.qualtrics.com/SE/?$query_string

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL: https://rt.umbc.edu/Ticket/Display.html?id=706954 >

Thank You

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu mailto:kirby@umbc.edu

On Jun 22, 2016, at 5:12 AM, Christian Loos <cloos@netcologne.de mailto:cloos@netcologne.de> wrote:

Am 22.06.2016 um 10:59 schrieb Emmanuel Lacour:

Nice idea, but is $m available in RT templates (never tried) ?

You are right, you must replace line

my $query_string = $m->comp(‘/Elements/QueryString’,

with

my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

Chris

Christian Loos

NETCOLOGNE Gesellschaft f�r Telekommunikation mbH
Am Coloneum 9 | 50829 K�ln

Gesch�ftsf�hrer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG K�ln

Thank you for such a quick response

I did what you said and it suppresses the value in the email but I am still not getting the value for query_string places within the url for some reason. I did remove the quotes as that was a last ditch effort the last time I tried

Here is the result with the s in from of comp

If you agree your issue is resolved, please give us feedback on your experience by completing a brief satisfaction survey:

https://umbc.co1.qualtrics.com/SE/? https://umbc.co1.qualtrics.com/SE/?

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu> On Jun 22, 2016, at 6:52 AM, Christian Loos cloos@netcologne.de wrote:

OK, my fault :wink:

Change

my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

to this (note the ‘s’)

my $query_string = $HTML::Mason::Commands::m->scomp(‘/Elements/QueryString’,

and this

https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

should be this (no quotes)

https://umbc.co1.qualtrics.com/SE/?{$query_string}

Chris

Am 22.06.2016 um 12:40 schrieb Joe Kirby:

Thank you both.

It does do a great job of translating however it does not seem the field
is actually available for the command line

Here is the full template and then the email result. Am I missing a
comma or something?

TEMPLATE--------
RT-Attach-Message: Yes
Subject: {$Ticket->Subject} [RESOLVED]

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

{$Transaction->Content()}


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

{
my $query_string = $HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}
https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL:
{RT->Config->Get(‘WebURL’)}Ticket/Display.html?id={$Ticket->id} >

Thank You
——————————

Email result from TEMPLATE

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

This transaction appears to have no content


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

SID=SV_4IbNK0n1unOaIEB&customeremail=jkirby%40umbc.edu
http://40umbc.edu&groupid=BSG&ticketid=706954&ticketsubject=Test%20Case%23%201234
https://umbc.co1.qualtrics.com/SE/?$query_string

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL: https://rt.umbc.edu/Ticket/Display.html?id=706954 >

Thank You

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu mailto:kirby@umbc.edu

On Jun 22, 2016, at 5:12 AM, Christian Loos <cloos@netcologne.de mailto:cloos@netcologne.de> wrote:

Am 22.06.2016 um 10:59 schrieb Emmanuel Lacour:

Nice idea, but is $m available in RT templates (never tried) ?

You are right, you must replace line

my $query_string = $m->comp(‘/Elements/QueryString’,

with

my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

Chris


Christian Loos

NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln

Geschäftsführer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG Köln

OK, I now see the problem.

Try this:

https://umbc.co1.qualtrics.com/SE/?{$m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}Am 22.06.2016 um 12:56 schrieb Joe Kirby:

Thank you for such a quick response

I did what you said and it suppresses the value in the email but I am
still not getting the value for query_string places within the url for
some reason. I did remove the quotes as that was a last ditch effort the
last time I tried

Here is the result with the s in from of comp

If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

https://umbc.co1.qualtrics.com/SE/?

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu mailto:kirby@umbc.edu

On Jun 22, 2016, at 6:52 AM, Christian Loos <cloos@netcologne.de mailto:cloos@netcologne.de> wrote:

OK, my fault :wink:

Change

my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

to this (note the ‘s’)

my $query_string =
$HTML::Mason::Commands::m->scomp(‘/Elements/QueryString’,

and this

https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

should be this (no quotes)

https://umbc.co1.qualtrics.com/SE/?{$query_string}

Chris

Am 22.06.2016 um 12:40 schrieb Joe Kirby:

Thank you both.

It does do a great job of translating however it does not seem the field
is actually available for the command line

Here is the full template and then the email result. Am I missing a
comma or something?

TEMPLATE--------
RT-Attach-Message: Yes
Subject: {$Ticket->Subject} [RESOLVED]

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

{$Transaction->Content()}


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

{
my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}
https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL:
{RT->Config->Get(‘WebURL’)}Ticket/Display.html?id={$Ticket->id} >

Thank You
����������

Email result from TEMPLATE

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

This transaction appears to have no content


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

SID=SV_4IbNK0n1unOaIEB&customeremail=jkirby%40umbc.edu
http://40umbc.edu&groupid=BSG&ticketid=706954&ticketsubject=Test%20Case%23%201234
https://umbc.co1.qualtrics.com/SE/?$query_string

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL: https://rt.umbc.edu/Ticket/Display.html?id=706954 >

Thank You

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu mailto:kirby@umbc.edu

On Jun 22, 2016, at 5:12 AM, Christian Loos <cloos@netcologne.de mailto:cloos@netcologne.de> wrote:

Am 22.06.2016 um 10:59 schrieb Emmanuel Lacour:

Nice idea, but is $m available in RT templates (never tried) ?

You are right, you must replace line

my $query_string = $m->comp(‘/Elements/QueryString’,

with

my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

Chris


Christian Loos

NETCOLOGNE Gesellschaft f�r Telekommunikation mbH
Am Coloneum 9 | 50829 K�ln

Gesch�ftsf�hrer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG K�ln

Christian Loos

NETCOLOGNE Gesellschaft f�r Telekommunikation mbH
Am Coloneum 9 | 50829 K�ln

Gesch�ftsf�hrer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG K�ln

OK, again a copy&past error, use this one

https://umbc.co1.qualtrics.com/SE/?{$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}Am 22.06.2016 um 13:00 schrieb Christian Loos:

OK, I now see the problem.

Try this:

https://umbc.co1.qualtrics.com/SE/?{$m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}

Christian Loos

NETCOLOGNE Gesellschaft f�r Telekommunikation mbH
Am Coloneum 9 | 50829 K�ln

Gesch�ftsf�hrer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG K�ln

I really appreciate your efforts on this and when I did this, which seemed to look really good, I got the following error in the logs

BTW, I tried it with comp and scomp

[3056] [Wed Jun 22 11:01:32 2016] [error]: Template parsing error: Can’t call method “comp” on an undefined value at template line 13, line 2271.

Stack:
[template:13]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:553]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:503]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:434]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:414]
[/local/rt-4.2.11/sbin/…/lib/RT/Action/SendEmail.pm:139]
[/local/rt-4.2.11/sbin/…/lib/RT/Action/Notify.pm:69]
[/local/rt-4.2.11/sbin/…/lib/RT/ScripAction.pm:223]
[/local/rt-4.2.11/sbin/…/lib/RT/Scrip.pm:637]
[/local/rt-4.2.11/sbin/…/lib/RT/Scrips.pm:342]
[/local/rt-4.2.11/sbin/…/local/lib/RT/Transaction.pm:189]
[/local/rt-4.2.11/sbin/…/lib/RT/Record.pm:1696]
[/local/rt-4.2.11/sbin/…/lib/RT/Ticket.pm:2709]
[/local/rt-4.2.11/sbin/…/lib/RT/Ticket.pm:2411]
[/local/rt-4.2.11/sbin/…/lib/RT/Ticket.pm:2361]
[/local/rt-4.2.11/sbin/…/lib/RT/Record.pm:1011]
[/local/rt-4.2.11/sbin/…/lib/RT/Record.pm:990]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:2774]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:2886]
[/local/rt-4.2.11/share/html/Ticket/Modify.html:97]
[/local/rt-4.2.11/share/html/Ticket/autohandler:66]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:681]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:369]
[/local/rt-4.2.11/share/html/autohandler:53] (/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:548)
[3056] [Wed Jun 22 11:01:32 2016] [info]: #706954/12400455 - Scrip 943 UMBC-10 On Correspond for Other Recipients - Transbatch (/local/rt-4.2.11/sbin/…/lib/RT/Action/SendEmail.pm:284)
[3056] [Wed Jun 22 11:01:32 2016] [info]: No recipients found. Not sending. (/local/rt-4.2.11/sbin/…/lib/RT/Interface/Email.pm:380)
[3056] [Wed Jun 22 11:02:22 2016] [error]: Template parsing error: Can’t call method “scomp” on an undefined value at template line 13, line 2271.

Stack:
[template:13]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:553]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:503]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:434]
[/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:414]
[/local/rt-4.2.11/sbin/…/lib/RT/Action/SendEmail.pm:139]
[/local/rt-4.2.11/sbin/…/lib/RT/Action/Notify.pm:69]
[/local/rt-4.2.11/sbin/…/lib/RT/ScripAction.pm:223]
[/local/rt-4.2.11/sbin/…/lib/RT/Scrip.pm:637]
[/local/rt-4.2.11/sbin/…/lib/RT/Scrips.pm:342]
[/local/rt-4.2.11/sbin/…/local/lib/RT/Transaction.pm:189]
[/local/rt-4.2.11/sbin/…/lib/RT/Record.pm:1696]
[/local/rt-4.2.11/sbin/…/lib/RT/Ticket.pm:2709]
[/local/rt-4.2.11/sbin/…/lib/RT/Ticket.pm:2411]
[/local/rt-4.2.11/sbin/…/lib/RT/Ticket.pm:2361]
[/local/rt-4.2.11/sbin/…/lib/RT/Record.pm:1011]
[/local/rt-4.2.11/sbin/…/lib/RT/Record.pm:990]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:2774]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:2886]
[/local/rt-4.2.11/share/html/Ticket/Modify.html:97]
[/local/rt-4.2.11/share/html/Ticket/autohandler:66]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:681]
[/local/rt-4.2.11/sbin/…/lib/RT/Interface/Web.pm:369]
[/local/rt-4.2.11/share/html/autohandler:53] (/local/rt-4.2.11/sbin/…/lib/RT/Template.pm:548)

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu> On Jun 22, 2016, at 7:00 AM, Christian Loos cloos@netcologne.de wrote:

OK, I now see the problem.

Try this:

https://umbc.co1.qualtrics.com/SE/?{$m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}

Am 22.06.2016 um 12:56 schrieb Joe Kirby:

Thank you for such a quick response

I did what you said and it suppresses the value in the email but I am
still not getting the value for query_string places within the url for
some reason. I did remove the quotes as that was a last ditch effort the
last time I tried

Here is the result with the s in from of comp

If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

https://umbc.co1.qualtrics.com/SE/?

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu mailto:kirby@umbc.edu

On Jun 22, 2016, at 6:52 AM, Christian Loos <cloos@netcologne.de mailto:cloos@netcologne.de> wrote:

OK, my fault :wink:

Change

my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

to this (note the ‘s’)

my $query_string =
$HTML::Mason::Commands::m->scomp(‘/Elements/QueryString’,

and this

https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

should be this (no quotes)

https://umbc.co1.qualtrics.com/SE/?{$query_string}

Chris

Am 22.06.2016 um 12:40 schrieb Joe Kirby:

Thank you both.

It does do a great job of translating however it does not seem the field
is actually available for the command line

Here is the full template and then the email result. Am I missing a
comma or something?

TEMPLATE--------
RT-Attach-Message: Yes
Subject: {$Ticket->Subject} [RESOLVED]

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

{$Transaction->Content()}


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

{
my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}
https://umbc.co1.qualtrics.com/SE/?{‘$query_string’}

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL:
{RT->Config->Get(‘WebURL’)}Ticket/Display.html?id={$Ticket->id} >

Thank You
——————————

Email result from TEMPLATE

R e s o l u t i o n:
= = = = = = = = = = = = = = = = = = =

This transaction appears to have no content


If you agree your issue is resolved, please give us feedback on your
experience by completing a brief satisfaction survey:

SID=SV_4IbNK0n1unOaIEB&customeremail=jkirby%40umbc.edu
http://40umbc.edu&groupid=BSG&ticketid=706954&ticketsubject=Test%20Case%23%201234
https://umbc.co1.qualtrics.com/SE/?$query_string

If you believe your issue has not been resolved, please respond to this
message, which will reopen your ticket. Note: A full record of your
request can be found at:

Ticket <URL: https://rt.umbc.edu/Ticket/Display.html?id=706954 >

Thank You

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu mailto:kirby@umbc.edu

On Jun 22, 2016, at 5:12 AM, Christian Loos <cloos@netcologne.de mailto:cloos@netcologne.de> wrote:

Am 22.06.2016 um 10:59 schrieb Emmanuel Lacour:

Nice idea, but is $m available in RT templates (never tried) ?

You are right, you must replace line

my $query_string = $m->comp(‘/Elements/QueryString’,

with

my $query_string =
$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,

Chris


Christian Loos

NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln

Geschäftsführer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG Köln


Christian Loos

NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln

Geschäftsführer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG Köln

Got it!!! It worked great.

Thank you so so much.

Joe

Joe Kirby , Assistant Vice President, Business Systems
Division of Information Technology (DoIT)
Support Response - http://www.umbc.edu/doit
Administration 627
Office - 410-455-3020
Email - kirby@umbc.edu> On Jun 22, 2016, at 7:04 AM, Christian Loos cloos@netcologne.de wrote:

OK, again a copy&past error, use this one

https://umbc.co1.qualtrics.com/SE/?{$HTML::Mason::Commands::m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}

Am 22.06.2016 um 13:00 schrieb Christian Loos:

OK, I now see the problem.

Try this:

https://umbc.co1.qualtrics.com/SE/?{$m->comp(‘/Elements/QueryString’,
SID => ‘SV_4IbNK0n1unOaIEB’,
groupid => ‘BSG’,
ticketid => $Ticket->Id,
ticketowner => $Ticket->OwnerObj->EmailAddress,
customeremail => $Ticket->RequestorAddresses,
ticketsubject => $Ticket->Subject,
);
}


Christian Loos

NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln

Geschäftsführer: Jost Hermanns, Mario Wilhelm
Vorsitzender des Aufsichtsrates: Dr. Andreas Cerbe
HRB 25580, AG Köln