[rt-users] REST API, AUTOMATION and Recipes.

2016-10-26 Thread Reza

/*Greetings Community:*/

Past 3:00 AM EST here in Toronto and this learning exercise is just too 
darn addictive!


I've already been digging deep inside the API documentations of RT, to 
be more specific the REST API.


The contributors and developers of RT are simply pure ingenious. The 
REST API is allowing any Joe like me to come up with a beautifully 
designed web interface and communicate with RT to do almost anything (if 
not all).  I've already started writing code to integrate with bash 
scripts, php, simple CURL, etc., as the initial input by web-form, or 
telephone touch pad.  I'm only beginning to imagine the potential of a 
phone system integration of a call centre into RT.


Most of us here are systems admins, system analysts and coders. Just 
curious...  how many of you folks here in this community have actually 
written your own apps to integrate with RT via the REST API?


Thanks!
Reza.

[Superbly pumped to learn more.  Cheers!]


-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] "Hidden" tickets suddenly appear

2016-10-26 Thread Martin Wheldon

Hi Jeff,

If you examine the ticket history of the problem ticket it should tell 
you what happened

for it to be set back to the "new" status.

Is it being reopened by a reply to a email from the pervious ticket 
corespondance perhaps??


Best Regards

Martin

On 2016-10-25 16:00, Jeff Blaine wrote:

RT 4.2.13 backed by PostgreSQL, though I feel like we've been
experiencing the following for many versions.

I've been suspect for quite some time, but thought maybe I was losing 
my
mind instead. I've confirmed finally that I am not losing my mind re: 
RT
in this specific case. We are definitely seeing the following 
situation.


I'm curious if anyone has thoughts as to where to start debugging the
root cause.

I use a simple saved search as my view into RT at work. Others using
this queue also use a similar one. The query is:

Queue = 'atcc-help'
AND
   (
  Status = 'new'
  OR Status = 'open'
  OR Status = 'stalled'
   )
AND (
   Owner = 'Nobody'
   OR Owner = 'jbla...@our.org'
)

The display settings for the search have "Rows: Unlimited"

It results in a daily list of 70-120 tickets.

We are seeing tickets appear in this list, where they have never
appeared in the list before, after some period of being in the queue. 
In

most cases, the mystery ticket has a "Created" date of more than a few
weeks ago. The most recent case was 5 months. That is, a ticket with
"Created" of around 5 months ago, and in "new" status, showed up in the
results of the search above where it never had shown up before.

As you can imagine, this is terrible for customer service. Luckily it
seems pretty rare. I would estimate that we see this happen ~5 times 
per
year, and then have to start the very awkward conversation about how 
the

ticket "slipped through our cracks".

Thoughts very welcome.

Jeff
-
RT 4.4 and RTIR training sessions, and a new workshop day!
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] REST API, AUTOMATION and Recipes.

2016-10-26 Thread Keith Creasy
Hi Reza.

Nothing all that complicated but I did write an interface using Angular that 
compiles some statistical information on RT tickets and children. It creates a 
nice report on the progress toward milestones. Things like estimated time, time 
worked, time remaining, percent complete, and a color-coded status. It gives 
totals for each “epic” and a total for all work in progress, work completed, 
and work that has not yet begun.

I’m sure I could do a lot more but coding all this really isn’t “my job” and so 
time is limited.


Good luck.

Keith


Keith Creasy, Programmer and Technical Lead
American Printing House f/t Blind
Phone: 502.895.2405
Skype: keith537

From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Reza
Sent: Wednesday, October 26, 2016 3:17 AM
To: rt-users
Subject: [rt-users] REST API, AUTOMATION and Recipes.


Greetings Community:

Past 3:00 AM EST here in Toronto and this learning exercise is just too darn 
addictive!

I've already been digging deep inside the API documentations of RT, to be more 
specific the REST API.

The contributors and developers of RT are simply pure ingenious.  The REST API 
is allowing any Joe like me to come up with a beautifully designed web 
interface and communicate with RT to do almost anything (if not all).  I've 
already started writing code to integrate with bash scripts, php, simple CURL, 
etc., as the initial input by web-form, or telephone touch pad.  I'm only 
beginning to imagine the potential of a phone system integration of a call 
centre into RT.

Most of us here are systems admins, system analysts and coders.  Just 
curious...  how many of you folks here in this community have actually written 
your own apps to integrate with RT via the REST API?

Thanks!
Reza.

[Superbly pumped to learn more.  Cheers!]


-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] How to AllowSorting in AssetList in SelfService

2016-10-26 Thread Dimitris Maniadakis via rt-users
--- Begin Message ---
Hello, please any ideas - solutions on this?
When changing the "AllowSorting" value to "1", still sorting does not respond.
Are further changes needed?

Dimitris




On Tuesday, October 25, 2016 4:08 PM, Dimitris Maniadakis via rt-users 
 wrote:
Hello everybody,

I need your help on the following, please.

I would like to allow sorting of the Asset List in the SelfService.
I create a copy (Customization with local dir) of the relevant file 
/opt/rt4/share/html/User/Elements/AssetList
in the local dir: /opt/rt4/local/html/User/Elements/AssetList

There, I change the "AllowSorting" value to "1".

Then, the user can actually click on the column header to sort each column.
However, the generated url appears not to be working!
For example, the generated url when trying to sort based on the "Name" is:

https:///SelfService/Asset/index.html?Format=%0A%20%20%20%20%27%3Cb%3E%3Ca%20href%3D%22__WebHomePath__%2FAsset%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%20%20%20%20%27%3Cb%3E%3Ca%20href%3D%22__WebHomePath__%2FAsset%2FDisplay.html%3Fid%3D__id__%22%3E__Name__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3AName%27%2C%0A%20%20%20%20Description%2C%0A&Order=ASC&OrderBy=Name&Page=1

As you may see the url contains the $Format! I cannot find a way to get rid of 
it. Any ideas?


Thanks in advance!
Dimitris
--- End Message ---
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] REST API, AUTOMATION and Recipes.

2016-10-26 Thread Guadagnino Cristiano
Hi Reza,

I have written a little open source Windows application that sits in the system 
tray and notifies you when a new ticket arrives or when someone reopens one of 
your closed tickets.

It is communicating with RT through the REST APIs.



You can find it here, if you're curious:

https://app.assembla.com/spaces/rtcheckerv2/wiki



It still has a couple bugs, but we're all using it here in production.



Cris







Il mercoledì 26 ottobre 2016 alle 03:17:05 CEST, Reza ha scritto:

Greetings Community:

Past 3:00 AM EST here in Toronto and this learning exercise is just too darn 
addictive!

I've already been digging deep inside the API documentations of RT, to be more 
specific the REST API.

The contributors and developers of RT are simply pure ingenious.  The REST API 
is allowing any Joe like me to come up with a beautifully designed web 
interface and communicate with RT to do almost anything (if not all).  I've 
already started writing code to integrate with bash scripts, php, simple CURL, 
etc., as the initial input by web-form, or telephone touch pad.  I'm only 
beginning to imagine the potential of a phone system integration of a call 
centre into RT.

Most of us here are systems admins, system analysts and coders.  Just 
curious...  how many of you folks here in this community have actually written 
your own apps to integrate with RT via the REST API?

Thanks!
Reza.

[Superbly pumped to learn more.  Cheers!]



-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] applying script to single queue

2016-10-26 Thread Alex Hall
Hello list,
After everything I've learned about RT, I feel like I should know this
without even having to think about it, but I don't. How do I apply a script
to a single queue, so I can take a seldom-used queue and test out new
templates?

I've gone to the queue, then scripts, but when I click a script to modify
it, I am told it applies globally. When I click the link to change that, I
just get a table of globally applied scripts, a table of unused scripts,
and that's all. How do I make a script--or a clone of a script, if I have
to do it that way--apply to just one queue? Thanks in advance.

-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Greetings from a New RT user in Toronto.

2016-10-26 Thread Jeff Voskamp

On 25/10/16 12:18 PM, Reza wrote:

Greetings Jeff:

Thank you for your reply.

The use case for random IDs is quite simple.   Ascending / serial 
number of IDs compromises confidentiality.  End users would be able to 
guess how busy I could be with the amount of tickets answered.  Its 
something I don't want to disclose.   Almost ALL ticketing systems I 
have seen, have a random arbitrary numeric or alpha-numeric ID.  Any 
other suggestions on how to approach not displaying an obvious number 
to end users?


Thanks!
Reza.


The increasing ticket number is baked into the Ticket table definition:
`id` int(11) NOT NULL AUTO_INCREMENT,

There's probably bits of code that assume this works this way.

Jeff
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


[rt-users] error when using custom template

2016-10-26 Thread Alex Hall
Hello list,
I'm starting to test a custom template. When RT tries to use it, I see an
error appear in the system log:

Use of uninitialized value in substitution (s///) at
/opt/rt4/sbin/../lib/RT/Transaction.pm line 362

That line seems to be detecting any form of new line it can, so how could
my template possibly cause such an odd problem? This is my first stab at
custom templates; my boss doesn't want quoted text, so he wants reply links
in the body of notification emails that people will use in place of
standard email replies. I've pasted the text of my template below:


Subject: {$Transaction->CreatorObj->Name} Updated Ticket {Ticket->id}

Ticket {$Ticket->id} was updated (
mailto:{$Ticket->QueueObj->CorrespondAddress}">click here to
reply):

{$Transaction->Description}

Please do not reply to this message. Instead,
mailto:{$Ticket->QueueObj->CorrespondAddress}">click here to
reply,
or
open this
ticket on the ticket site.


-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] Articles in 4.4.1, Issues with search and text showing up in comments.

2016-10-26 Thread Lori Welch
Having an issue while setting up articles in RT 4.4.1.
I have made the following RT_SiteConfig changes:

#Set Articles
Set($ArticleOnTicketCreate, 1);
Set($HideArticleSearchOnReplyCreate, 0);

On Create, I do not see Articles for an option.

ON Reply, Comment, the search comes up, but does not work.
I am able to put in the article number, but that only adds a link, not any text 
to the comment.


What am I doing wrong?

I have 4 classes, with 4 tickets under each.
I get a search box, and no matter what I type I get no options.

Under Articles,
I am able to search for articles, but only for the class.
I am also unable to load or save searches.

I have also tried logged in as root, same thing.
Search Box Example:

[cid:image001.png@01D22F8E.655BC420]
Article added as a link, no text added
[cid:image002.png@01D22F8E.B8E543A0]

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] REST API, AUTOMATION and Recipes.

2016-10-26 Thread Reza

Keith, Cris,  thank you for sharing.

Cris, I'm going to look into that wiki of yours.

To share with both of you, I just finished writing a combination of bash 
scripts, combined with an Open Source VOIP switch (Asterisk)  and am 
able to create tickets ON THE FLY, real time, with caller id name and 
number, inserted into the ticket, with a unique identifier for call 
recordings for an active on-going call.


This is more of a hobby / learning exercise.  Its very much at its 
primitive stages but very functional.


Since its barely 3-4 days since I started with RT, I'm documenting all 
the steps and questions that I'm coming up with. Perhaps that doc will 
help with future learning of enthusiasts.


Hopefully more people will share what they are doing with the REST API, 
as it gives us all more perspective of what can be done and what people 
doing in real life.


Thanks!
Reza.



Reza wrote on 10/26/2016 3:17 AM:


/*Greetings Community:*/

Past 3:00 AM EST here in Toronto and this learning exercise is just 
too darn addictive!


I've already been digging deep inside the API documentations of RT, to 
be more specific the REST API.


The contributors and developers of RT are simply pure ingenious.  The 
REST API is allowing any Joe like me to come up with a beautifully 
designed web interface and communicate with RT to do almost anything 
(if not all).  I've already started writing code to integrate with 
bash scripts, php, simple CURL, etc., as the initial input by 
web-form, or telephone touch pad. I'm only beginning to imagine the 
potential of a phone system integration of a call centre into RT.


Most of us here are systems admins, system analysts and coders.  Just 
curious...  how many of you folks here in this community have actually 
written your own apps to integrate with RT via the REST API?


Thanks!
Reza.

[Superbly pumped to learn more.  Cheers!]




-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] Secondary Approvals

2016-10-26 Thread Dunbar, Brian
Hello List!

I am setting up a new queue for our Hiring Team. They need approvals setup. 
First is HR approval with range for the position.
Then the requesting manager needs a director’s approval to move forward. We 
have many directors and the directors need the range information before they 
will approve.

I setup HR as Approvers in RT Approval using  __Approvals using Template and 
scrip from this link 
https://docs.bestpractical.com/rt/4.4.0/customizing/approvals.html


This works for the initial approval by HR

Now is there a way to make  secondary approval from the director  as well I do 
not want every director being notified of a pending approval only the relevant 
director.

Any help would be greatly appreciated.

Brian

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Secondary Approvals

2016-10-26 Thread Matt Zagrabelny
Hi Brian,

On Wed, Oct 26, 2016 at 2:45 PM, Dunbar, Brian  wrote:

> Any help would be greatly appreciated.

I don't know about secondary approvals. If the approvals approach
doesn't solve your problem, you could solve it with a lifecycle.

-m
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] error when using custom template

2016-10-26 Thread Landon Stewart
Add this directly above or below the Subject line in the template but before 
the blank line.


Content-Type: text/html

On Oct 26, 2016, at 12:15 PM, Alex Hall 
mailto:ah...@autodist.com>> wrote:

Hello list,
I'm starting to test a custom template. When RT tries to use it, I see an error 
appear in the system log:

Use of uninitialized value in substitution (s///) at 
/opt/rt4/sbin/../lib/RT/Transaction.pm line 362

That line seems to be detecting any form of new line it can, so how could my 
template possibly cause such an odd problem? This is my first stab at custom 
templates; my boss doesn't want quoted text, so he wants reply links in the 
body of notification emails that people will use in place of standard email 
replies. I've pasted the text of my template below:


Subject: {$Transaction->CreatorObj->Name} Updated Ticket {Ticket->id}

Ticket {$Ticket->id} was updated (
mailto:{$Ticket->QueueObj->CorrespondAddress}">click here to 
reply):

{$Transaction->Description}

Please do not reply to this message. Instead,
mailto:{$Ticket->QueueObj->CorrespondAddress}">click here to reply,
or
open this 
ticket on the ticket site.


--
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
📧 lstew...@internap.com
🌍 www.internap.com

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

[rt-users] Template snippet causes template to silently fail

2016-10-26 Thread Alex Hall
Hi all,
The way our company uses RT, there's no need to distinguish between
comments and replies, and users may use either one without realizing the
difference. In my new email template, I want to show whichever was set. My
template works fine without the two if statements I'm trying to use, but as
soon as I put them in, it fails. The odd thing is that, though the email
using the template is never sent, I don't get any errors at all. When I was
missing a dollar sign earlier, I got an error--an error not really related
to the dollar sign, but an error. Now, though, I get nothing whatsoever.
Here's the snippet:

{ if (my $transactionCorrespond = $Transaction->correspond) {
$transactionCorrespond
} elsif (my $transactionComment = $Transaction->comment) {
$transactionComment }
}

I don't know what's so wrong with that bit of code, but there must be
something. I don't really speak Perl, and the only page I've found thus far
that enumerates the Transaction object properties isn't overly helpful, so
I'm guessing at the properties I need. Can anyone see what I've done wrong
here? Thanks.

-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Template snippet causes template to silently fail

2016-10-26 Thread Matt Zagrabelny
Hey Alex,

On Wed, Oct 26, 2016 at 4:29 PM, Alex Hall  wrote:
> Hi all,
> The way our company uses RT, there's no need to distinguish between comments
> and replies, and users may use either one without realizing the difference.
> In my new email template, I want to show whichever was set. My template
> works fine without the two if statements I'm trying to use, but as soon as I
> put them in, it fails. The odd thing is that, though the email using the
> template is never sent, I don't get any errors at all. When I was missing a
> dollar sign earlier, I got an error--an error not really related to the
> dollar sign, but an error. Now, though, I get nothing whatsoever. Here's the
> snippet:

You can see some documentation regarding txns at:

https://docs.bestpractical.com/rt/4.4.1/RT/Transaction.html

> { if (my $transactionCorrespond = $Transaction->correspond) {
> $transactionCorrespond
> } elsif (my $transactionComment = $Transaction->comment) {
> $transactionComment }
> }

# Here is some untested code...

my $type = $Transaction->Type;

# $type now holds "Correspond" or "Comment"

if ($type eq 'Correspond') {
# do something for correspond
}
elsif ($type eq 'Comment') {
# do something for comment
}
else {
# Perhaps this txn is a Create...
}

-m
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Template snippet causes template to silently fail

2016-10-26 Thread Landon Stewart
On Oct 26, 2016, at 2:29 PM, Alex Hall 
mailto:ah...@autodist.com>> wrote:

Hi all,
The way our company uses RT, there's no need to distinguish between comments 
and replies, and users may use either one without realizing the difference. In 
my new email template, I want to show whichever was set. My template works fine 
without the two if statements I'm trying to use, but as soon as I put them in, 
it fails. The odd thing is that, though the email using the template is never 
sent, I don't get any errors at all. When I was missing a dollar sign earlier, 
I got an error--an error not really related to the dollar sign, but an error. 
Now, though, I get nothing whatsoever. Here's the snippet:

{ if (my $transactionCorrespond = $Transaction->correspond) { 
$transactionCorrespond
} elsif (my $transactionComment = $Transaction->comment) { $transactionComment }
}

I don't know what's so wrong with that bit of code, but there must be 
something. I don't really speak Perl, and the only page I've found thus far 
that enumerates the Transaction object properties isn't overly helpful, so I'm 
guessing at the properties I need. Can anyone see what I've done wrong here? 
Thanks.

Since $Transaction is a thing then $Transaction->correspond is empty since it's 
not a thing.  This is why you'll get no errors.

Try this:
{
  if ($self->TransactionObj->Type eq 'Correspond') {
# something
  } elsif ($self->TransactionObj->Type eq 'Comment') {
# something else
  } else {
# Not a Comment or Correspond transaction
  }
}

Or something that actually does exactly what your pseudocode does:
{ $self->TransactionObj->Type }

I have found these very helpful in the past:
https://rt-wiki.bestpractical.com/wiki/CustomConditionSnippets

--
Landon Stewart
Lead Analyst - Abuse and Security Management
INTERNAP ®
📧 lstew...@internap.com
🌍 www.internap.com

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017