Issue with creating linked tickets

Jim

Thanks for the suggestion.

I tried removing the line and now it does not create linked tickets at all.

I went to the url you shared and all the examples have the Type: approval

I hope someone has a suggestion as this is key to my project and it seems like it could work.

Thanks in advance

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.eduOn Apr 22, 2013, at 12:00 PM, rt-users-request@lists.bestpractical.com wrote:

Send rt-users mailing list submissions to
rt-users@lists.bestpractical.com

To subscribe or unsubscribe via the World Wide Web, visit
The rt-users Archives
or, via email, send a message with subject or body ‘help’ to
rt-users-request@lists.bestpractical.com

You can reach the person managing the list at
rt-users-owner@lists.bestpractical.com

When replying, please edit your Subject line so it is more specific
than “Re: Contents of rt-users digest…”

Today’s Topics:

  1. Issue with creating linked tickets automatically (Joe Kirby)
  2. Re: Issue with creating linked tickets automatically (Jim Brandt)

Message: 1
Date: Sun, 21 Apr 2013 13:30:45 -0400
From: Joe Kirby kirby@umbc.edu
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Issue with creating linked tickets automatically
Message-ID: 1542B2D9-AC07-4917-A372-5684D917B404@umbc.edu
Content-Type: text/plain; charset=us-ascii

I have a extension installed to allow a template to create linked tickets in certain situations.

Everything seems to work great except the query tool does not recognize the tickets in the queue.

If I go into the parent and see the children and vice versa. If I use the ticket number all is good

It just does not show up in any of the reports when selected. This is not an issue when I manually create the link ticket.

I am 4.0.6 and here is the template I am using the following template with a script that has the action of create tickets using this template.

If I am missing a line or a command that is causing the queue to not be visible please advise.

===Create-Ticket: Financial Aid and Scholarships - Referral
Subject: Financial Aid and Scholarships - Referral has been requested from a Phone request for {$Tickets{‘TOP’}->Subject}
Referred-To-By: {$Tickets{‘TOP’}->Id}
Queue: Financial Aid and Scholarships - Referral
InitialPriority: 99
FinalPriority: 99
Requestor: {$Tickets{‘TOP’}->RequestorAddresses}
Type: approval
Content: This request is a referral from a phone customer for Financial Aid and Scholarships. The initial ticket has been closed but linked to this ticket for any pertinent information
ENDOFCONTENT

Thanks

Joe

Also: Note to Rus. I am having the Commandbymail extension added this coming week. Thank you very much for the suggestion

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


Message: 2
Date: Mon, 22 Apr 2013 07:53:38 -0400
From: Jim Brandt jbrandt@bestpractical.com
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Issue with creating linked tickets
automatically
Message-ID: 517524C2.4000007@bestpractical.com
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

You have Type: approval as one of your lines. Do you intend to create
approval tickets? (Approval tickets are used in the RT approvals
process: Customizing/Approvals - RT 5.0.5 Documentation - Best Practical)

If you just want regular tickets, try removing that line.

On 4/21/13 1:30 PM, Joe Kirby wrote:

I have a extension installed to allow a template to create linked tickets in certain situations.

Everything seems to work great except the query tool does not recognize the tickets in the queue.

If I go into the parent and see the children and vice versa. If I use the ticket number all is good

It just does not show up in any of the reports when selected. This is not an issue when I manually create the link ticket.

I am 4.0.6 and here is the template I am using the following template with a script that has the action of create tickets using this template.

If I am missing a line or a command that is causing the queue to not be visible please advise.

===Create-Ticket: Financial Aid and Scholarships - Referral
Subject: Financial Aid and Scholarships - Referral has been requested from a Phone request for {$Tickets{‘TOP’}->Subject}
Referred-To-By: {$Tickets{‘TOP’}->Id}
Queue: Financial Aid and Scholarships - Referral
InitialPriority: 99
FinalPriority: 99
Requestor: {$Tickets{‘TOP’}->RequestorAddresses}
Type: approval
Content: This request is a referral from a phone customer for Financial Aid and Scholarships. The initial ticket has been closed but linked to this ticket for any pertinent information
ENDOFCONTENT

Thanks

Joe

Also: Note to Rus. I am having the Commandbymail extension added this coming week. Thank you very much for the suggestion

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



rt-users mailing list
rt-users@lists.bestpractical.com
The rt-users Archives

End of rt-users Digest, Vol 109, Issue 30


Jim

Thanks for the suggestion.

I tried removing the line and now it does not create linked tickets at all.

Anything in the error logs? I suspect your template is parsing
incorrectly for a different reason.

I went to the url you shared and all the examples have the Type: approval

… because Jim linked you to the approvals docs after asking if you
intended to create approvals. If you’re not trying to create approvals,
then don’t include that line.

I hope someone has a suggestion as this is key to my project and it
seems like it could work.

It works for lots of folks. There’s likely just an error in your template.

Send rt-users mailing list submissions to
rt-users@lists.bestpractical.com

To subscribe or unsubscribe via the World Wide Web, visit
The rt-users Archives
or, via email, send a message with subject or body ‘help’ to
rt-users-request@lists.bestpractical.com

You can reach the person managing the list at
rt-users-owner@lists.bestpractical.com

When replying, please edit your Subject line so it is more specific
than “Re: Contents of rt-users digest…”

Today’s Topics:

  1. Re: Custom condition for script (Jim Berry)
  2. Fwd: Adding Index to several tables to improve shredder
    performance (Rabin Yasharzadehe)
  3. Re: Issue with creating linked tickets (Joe Kirby)
  4. How change link labels (Ken Johnson)
  5. Re: Custom condition for script (Miles Scruggs)
  6. Re: Issue with creating linked tickets (Thomas Sibley)
  7. Script to collect info from child tickets (Tyler Harding)
  8. Re: How change link labels (Michael Steen)
  9. Re: Problems upgrading from 3.9.3 (saxmad)
  10. Re: Problems upgrading from 3.9.3 (saxmad)

Message: 1
Date: Tue, 23 Apr 2013 17:01:58 +0000
From: Jim Berry jim.h.berry@frb.gov
To: Miles Scruggs miles@digitalphotobox.net, RT users
rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Custom condition for script
Message-ID: 20130423170200.3A7932C4350@ibastion.frb.gov
Content-Type: text/plain; charset=“us-ascii”

This should do what you want . It could be generalized to use groups or AdminCc. Create a scrip with

Condition = On Create
Action = User Defined
Template = Blank
Stage = TransactionCreate

In the Custom action preparation code box, insert:

Add other user as a Cc if ticket is created by either in the users list

my @users = (‘user0@mydomain.com’, ‘user1@mydomain.com’);
my $creator = $self->TransactionObj->CreatorObj->EmailAddress;
my $Ticket = $self->TicketObj;

if ($creator eq $users[0]) {
$Ticket->AddWatcher(Type => ‘Cc’, Email => $users[1]);
}
elsif ($creator eq $users[1]) {
$Ticket->AddWatcher(Type => ‘Cc’, Email => $users[0]);
}

In the Custom action cleanup code box, insert:
1;

– Jim

From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Miles Scruggs
Sent: Monday, April 22, 2013 3:52 PM
To: RT users
Subject: Re: [rt-users] Custom condition for script

anyone able to help on this one?

I have a couple users that can’t be trained to CC each other, and they need to be CC’d on everything they create, but they also aren’t the only ones creating to the queue so I can’t just set them as a watcher for the queue.

Basically I would like to check on create to see if they are one or the other user, and if they are then I would like to add their counterpart as a CC to the ticket. Basically some code that looks like this:

if(user=bob | bill) {
AddUserAsCCToTicket(bob&bill)
}

The bad news here is that I’m incredibly dumb when it comes to perl, and have no grasp at all of the syntax much less the methods to use.

I’m guessing I put stuff like this in scrips, but I’m not 100% and I’m not sure if that can be put entirely in the condition or if I need to put it in both the condition and the action…

Cheers

Miles Scruggs
miles@digitalphotobox.netmailto:miles@digitalphotobox.net


Cheers,

Miles
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/9d8a10aa/attachment-0001.html


Message: 2
Date: Tue, 23 Apr 2013 21:20:01 +0300
From: Rabin Yasharzadehe rabin@isoc.org.il
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Fwd: Adding Index to several tables to improve
shredder performance
Message-ID:
CAKAdUjSaX0+zb3XoV6Cyo6g47uHt-=t9rsMqQQX1V_VLuQXneQ@mail.gmail.com
Content-Type: text/plain; charset=“utf-8”

Hello list,

In preparation for transferring our RT server to a new server
I started to clean up RT using the shredder tool,

For starters, I shred old tickets marked as deleted (mostly spam),

./rt-shredder --plugin "Tickets=query,Status = ‘Deleted’ AND LastUpdated

< ‘30 days ago’;limit,100" --sqldump /opt/shredder-restore-tickets-date +%s.sql --force

And the next step was deleting users who have no tickets

./rt-shredder --plugin

“Users=no_tickets,1;status,any;replace_relations,Nobody;limit,25” --sqldump
/opt/shredder-restore-tickets-date +%s.sql --force

Running the following commands from the command line would take me about
two hours to finish.

I’m no database expert, but i start searching around and enabled slow query
login for MySQL and i found out that the script hang a lot on query on the
Attachment table, the problem seemed to be a missing index for the
creator column.

mysql> ALTER TABLE Attachments ADD INDEX ( Creator )

After adding the above indexing for this column, the deletion time dropped
to less than 5 minutes

Given the success of the above method, I used it on other tables,
and found few more places that I can add indexing to improve shredder
timing.

ALTER TABLE Transactions ADD INDEX ( Creator )

ALTER TABLE ObjectCustomFieldValues ADD INDEX ( ObjectType )
ALTER TABLE ObjectCustomFieldValues ADD INDEX ( ObjectId )
ALTER TABLE Groups ADD INDEX ( LastUpdatedBy )
ALTER TABLE Principals ADD INDEX ( PrincipalType )
ALTER TABLE CachedGroupMembers ADD INDEX ( Via )
ALTER TABLE GroupMembers ADD INDEX ( LastUpdatedBy )
ALTER TABLE Groups ADD INDEX ( Creator )
ALTER TABLE Tickets ADD INDEX ( Creator )

My question is,
can i leave the above index ?
can those changes disturb or harm future upgrades of RT ?

Thanks in advance,

??
Rabin Yasharzadehe
-------------- next part --------------
An HTML attachment was scrubbed…
URL: http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/57b4ded9/attachment-0001.html


I found the following template and it worked great. Thank you all for your continued support on items like this.
This is a great community!!
Jim, this is pretty much what you had indicated and I think my regional attempt had an issue with the large subject line I was using. Thanks again

Joe
===Create-Ticket: Financial Aid and Scholarships - Referral
Referred-To-By: {$Tickets{‘TOP’}->Id}
Queue: Financial Aid and Scholarships - Referral
InitialPriority: 99
FinalPriority: 99
Requestor: {$Tickets{‘TOP’}->RequestorAddresses}
Content: This request is a referral from a walk-in customer for Financial Aid and Scholarships. The initial ticket has been closed but linked to this ticket for any pertinent information
ENDOFCONTENT