[rt-users] Issue with creating linked tickets

Joe Kirby kirby at umbc.edu
Wed Apr 24 08:37:43 EDT 2013



On Apr 24, 2013, at 7:06 AM, rt-users-request at lists.bestpractical.com wrote:

> Send rt-users mailing list submissions to
> 	rt-users at lists.bestpractical.com
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> or, via email, send a message with subject or body 'help' to
> 	rt-users-request at lists.bestpractical.com
> 
> You can reach the person managing the list at
> 	rt-users-owner at 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 at frb.gov>
> To: Miles Scruggs <miles at digitalphotobox.net>, RT users
> 	<rt-users at lists.bestpractical.com>
> Subject: Re: [rt-users] Custom condition for script
> Message-ID: <20130423170200.3A7932C4350 at 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 at mydomain.com', 'user1 at 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 at lists.bestpractical.com [mailto:rt-users-bounces at 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?
> 
> On Tue, Apr 16, 2013 at 10:46 AM, Miles Scruggs <miles at digitalphotobox.net<mailto:miles at digitalphotobox.net>> wrote:
> 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 at digitalphotobox.net<mailto:miles at 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 at isoc.org.il>
> To: rt-users at lists.bestpractical.com
> Subject: [rt-users] Fwd: Adding Index to several tables to improve
> 	shredder	performance
> Message-ID:
> 	<CAKAdUjSaX0+zb3XoV6Cyo6g47uHt-=t9rsMqQQX1V_VLuQXneQ at 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 
Subject: Referral::{$Tickets{'TOP'}->Subject}
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

> Message: 3
> Date: Tue, 23 Apr 2013 17:42:18 -0400
> From: Joe Kirby <kirby at umbc.edu>
> To: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] Issue with creating linked tickets
> Message-ID: <909DF5A0-ED3A-4B32-A64F-4231C056AA1C at umbc.edu>
> Content-Type: text/plain; charset="us-ascii"
> 
> 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 at umbc.edu
> 
> On Apr 22, 2013, at 12:00 PM, rt-users-request at lists.bestpractical.com wrote:
> 
>> Send rt-users mailing list submissions to
>> 	rt-users at lists.bestpractical.com
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>> or, via email, send a message with subject or body 'help' to
>> 	rt-users-request at lists.bestpractical.com
>> 
>> You can reach the person managing the list at
>> 	rt-users-owner at 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 at umbc.edu>
>> To: rt-users at lists.bestpractical.com
>> Subject: [rt-users] Issue with creating linked tickets automatically
>> Message-ID: <1542B2D9-AC07-4917-A372-5684D917B404 at 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 at umbc.edu
>> 
>> 
>> 
>> ------------------------------
>> 
>> Message: 2
>> Date: Mon, 22 Apr 2013 07:53:38 -0400
>> From: Jim Brandt <jbrandt at bestpractical.com>
>> To: rt-users at lists.bestpractical.com
>> Subject: Re: [rt-users] Issue with creating linked tickets
>> 	automatically
>> Message-ID: <517524C2.4000007 at 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: http://bestpractical.com/rt/docs/latest/customizing/approvals.html)
>> 
>> 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 at umbc.edu
>>> 
>> 
>> -- 
>> 
>> 
>> 
>> ------------------------------
>> 
>> --------
>> rt-users mailing list
>> rt-users at lists.bestpractical.com
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>> 
>> 
>> 
>> End of rt-users Digest, Vol 109, Issue 30
>> *****************************************
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/aba02e5e/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 4
> Date: Tue, 23 Apr 2013 16:51:32 -0500
> From: "Ken Johnson" <kjohnson at eclypse.org>
> To: "'RT users'" <rt-users at lists.bestpractical.com>
> Subject: [rt-users] How change link labels
> Message-ID: <22258089FD4F461EA1DD6254DE0D4D04 at KJDESKTOP>
> Content-Type: text/plain;	charset="us-ascii"
> 
> 
> I would like to change the 'Reply' and 'Comment' link labels within RT to
> something like 'Public Reply' and 'Private Comment' to make their respective
> functions more obviously explicit to staff who will use RT only
> occasionally.  Unfortunately, I have been unable to structure a google
> search to return useful information on this topic.  I would be grateful for
> any hints.
> 
> Thank you,
> 
> Ken
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Tue, 23 Apr 2013 14:54:23 -0700
> From: Miles Scruggs <miles at digitalphotobox.net>
> To: RT users <rt-users at lists.bestpractical.com>
> Subject: Re: [rt-users] Custom condition for script
> Message-ID: <C60612D0-6F99-4299-824E-09CFE47D82A8 at digitalphotobox.net>
> Content-Type: text/plain; charset="us-ascii"
> 
> Thanks Jim,
> 
> I think that has got me off and running now.  About order of execution, from what I read it is alphabetical, does that group queue specific scripts in with the globals and then order them?
> 
> Cheers
> 
> Miles Scruggs
> miles at digitalphotobox.net
> 
> 
> 
> On Apr 23, 2013, at 10:01 AM, Jim Berry <jim.h.berry at frb.gov> wrote:
> 
>> 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 at mydomain.com', 'user1 at 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 at lists.bestpractical.com [mailto:rt-users-bounces at 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?
>> 
>> 
>> On Tue, Apr 16, 2013 at 10:46 AM, Miles Scruggs <miles at digitalphotobox.net> wrote:
>> 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 at digitalphotobox.net
>> 
>> 
>> 
>> 
>> 
>> -- 
>> Cheers,
>> 
>> Miles
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/59b23350/attachment-0001.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: smime.p7s
> Type: application/pkcs7-signature
> Size: 4895 bytes
> Desc: not available
> URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/59b23350/attachment-0001.bin>
> 
> ------------------------------
> 
> Message: 6
> Date: Tue, 23 Apr 2013 14:56:12 -0700
> From: Thomas Sibley <trs at bestpractical.com>
> To: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] Issue with creating linked tickets
> Message-ID: <5177037C.6090907 at bestpractical.com>
> Content-Type: text/plain; charset=UTF-8
> 
> On 04/23/2013 02:42 PM, Joe Kirby wrote:
>> 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.
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Tue, 23 Apr 2013 22:46:15 +0000
> From: Tyler Harding <tharding at uoregon.edu>
> To: "rt-users at lists.bestpractical.com"
> 	<rt-users at lists.bestpractical.com>
> Subject: [rt-users] Script to collect info from child tickets
> Message-ID: <AD49239A1EAC714F80022E6E13C82CBAE1D667 at ad-oh-mbx01>
> Content-Type: text/plain; charset="us-ascii"
> 
> Hello all,
> 
> Apologies if this has been answered before, did my best to search and whatnot.
> 
> I'm writing a script that pokes around in child tickets. My abridged version of it:
> 
> my $Children = $self->TicketObj->Members();
> while( my $childTicket = $Children->Next ) {
> my $childId = $childTicket->TargetObj->id;
> # Do some other stuff here....
> }
> return 1;
> 
> However the above only gives me information about the ticket I started in (i.e. $self->TicketObj). For whatever reason, the following work as anticipated:
> 
> $self->TicketObj->MemberOf();
> $self->TicketObj->DependsOn();
> $self->TicketObj->RefersTo();
> 
> And these simply cough up the same ticket I started with:
> 
> $self->TicketObj->Members();
> $self->TicketObj->DependedOnBy();
> $self->TicketObj->ReferredToBy();
> 
> Any ideas?
> 
> Thank you,
> 
> -Tyler
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/3f34634b/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 8
> Date: Tue, 23 Apr 2013 20:57:26 -0500
> From: Michael Steen <michael.steen at livetext.com>
> To: "rt-users at lists.bestpractical.com"
> 	<rt-users at lists.bestpractical.com>
> Subject: Re: [rt-users] How change link labels
> Message-ID:
> 	<CAOmWLor7_4v3KKC3LkukHSGA1=_nNeESVJdYRxyM9pV7AP+xRA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Ken,
> 
> I did something of the sort when a user here said that a particular wording
> was not indicative of its meaning (basically, he did not like to see "Input
> must match [Mandatory]").  For our case, I modified our installation as
> follows:
> 
> Copied:
> share/html/Elements/ValidateCustomFields
> 
> To:
> local/html/Elements/ValidateCustomFields
> 
> Changed Line:
> my $msg = loc("Input must match [_1]", $CF->FriendlyPattern);
> 
> New Line:
> my $msg = loc("Field must match rule: [_1]", $CF->FriendlyPattern);
> 
> 
> I see the "message" you are referring to in
> /opt/rt3/share/html/m/_elements/ticket_menu.  Editing the element for your
> local installation may or may not be the most portable and maintainable
> way, but it worked for our site and nobody was harmed.  Since your similar
> situation has come up, I would be interested to find out what the usual or
> best practice is for site-specific wording.  It's clearly a matter of
> preference for our site, and the message in question does not appear
> elsewhere (AFAIK), so I left it at that, but perhaps updating
> local/po/en.po will turn out to be the recommended way.  Some information
> about updating translations is here ->
> http://requesttracker.wikia.com/wiki/Translation.
> 
> Best,
> 
> Mike
> 
> 
> On Tue, Apr 23, 2013 at 4:51 PM, Ken Johnson <kjohnson at eclypse.org> wrote:
> 
>> 
>> I would like to change the 'Reply' and 'Comment' link labels within RT to
>> something like 'Public Reply' and 'Private Comment' to make their
>> respective
>> functions more obviously explicit to staff who will use RT only
>> occasionally.  Unfortunately, I have been unable to structure a google
>> search to return useful information on this topic.  I would be grateful for
>> any hints.
>> 
>> Thank you,
>> 
>> Ken
>> 
>> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130423/89d58484/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 9
> Date: Wed, 24 Apr 2013 02:11:17 -0700 (PDT)
> From: saxmad <g.mason at fairfx.com>
> To: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] Problems upgrading from 3.9.3
> Message-ID: <1366794677920-53596.post at n7.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> Kevin - I think I get what you mean. My postgres knowledge is next to
> nothing, so hopefully I have got the appropriate information.
> 
> On my original 3.6.7 instance, I have the following :-
> 
>                                           Table "public.acl"
>    Column     |         Type          |                    Modifiers                    
> | Description 
> ---------------+-----------------------+--------------------------------------------------+-------------
> id            | integer               | not null default
> nextval('acl_id_seq'::regclass) | 
> principaltype | character varying(25) | not null                                        
> | 
> principalid   | integer               | not null                                        
> | 
> rightname     | character varying(25) | not null                                        
> | 
> objecttype    | character varying(25) | not null                                        
> | 
> objectid      | integer               | not null default 0                              
> | 
> delegatedby   | integer               | not null default 0                              
> | 
> delegatedfrom | integer               | not null default 0                              
> | 
> Indexes:
>    "acl_pkey" PRIMARY KEY, btree (id)
>    "acl1" btree (rightname, objecttype, objectid, principaltype,
> principalid)
> Has OIDs: no
> 
> On my new, upgraded version that is in limbo between 3.9.2 and 3.9.3, I have
> the following :-
> 
>                                                          Table "public.acl"
>    Column     |            Type             |                    Modifiers                    
> | Storage  | Stats target | Description 
> ---------------+-----------------------------+--------------------------------------------------+----------+--------------+-------------
> id            | integer                     | not null default
> nextval('acl_id_seq'::regclass) | plain    |              | 
> principaltype | character varying(25)       | not null                                        
> | extended |              | 
> principalid   | integer                     | not null                                        
> | plain    |              | 
> rightname     | character varying(25)       | not null                                        
> | extended |              | 
> objecttype    | character varying(25)       | not null                                        
> | extended |              | 
> objectid      | integer                     | not null default 0                              
> | plain    |              | 
> creator       | integer                     | not null default 0                              
> | plain    |              | 
> created       | timestamp without time zone |                                                 
> | plain    |              | 
> lastupdatedby | integer                     | not null default 0                              
> | plain    |              | 
> lastupdated   | timestamp without time zone |                                                 
> | plain    |              | 
> Indexes:
>    "acl_pkey" PRIMARY KEY, btree (id)
>    "acl1" btree (rightname, objecttype, objectid, principaltype,
> principalid)
> Has OIDs: no
> 
> So the DelegatedBy column is definately not there now.
> 
> When I looked at the acl table on a freshly imported version of the dump, I
> found that it looked exactly like upgraded version, and not like the
> original 3.6.7 version.  I checked the dump file and the acl table was
> indeed supposed to be set up using the correct formation (3.6.7 version).
> 
> Checking a bit deeper, it seems that I have two acl tables, one within the
> rtdb database, and another when connected to the default postgres database. 
> If I look at the layout of the spurious postgres version of the acl table,
> it has the 3.6.7 layout.
> 
> I don't know how this has happened, and is almost certainly the reason why
> the acl table doesn't upgrade properly, as it is already effectively
> upgraded before attempting the upgrade procedure.
> 
> I will clear out all traces of the rtdb database, and then check for
> residual tables etc, before trying another clean import.
> 
> Thanks for hanging in there :)
> 
> 
> 
> --
> View this message in context: http://requesttracker.8502.n7.nabble.com/Problems-upgrading-from-3-9-3-tp53543p53596.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
> 
> 
> ------------------------------
> 
> Message: 10
> Date: Wed, 24 Apr 2013 04:06:11 -0700 (PDT)
> From: saxmad <g.mason at fairfx.com>
> To: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] Problems upgrading from 3.9.3
> Message-ID: <1366801571799-53598.post at n7.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> After a lot of trial and error, I think I have worked out what is going on.
> 
> With a clean postgres database, I cannot import my dump file due to the
> rtuser role not being there.
> 
> So I initialised the database by running the rt-setup-database-4 --action
> init utility to put that right.  Unfortunately, part of this seems to be
> setting up the initial core data, which looks like it includes the acl
> table.
> 
> Dropping the database, tables and sequences but leaving the rtuser role
> intact, I can then import the dump file without any complaints.  Tables etc
> are created and populated, but it does not create the actual rtdb database -
> \l within psql does not show an rtdb entry.  I guess that initialising the
> database as above would sort that, but then give me the same problem with an
> pre-existing acl table.
> 
> So I think the answer to my problem is to determine exactly what the pg_dump
> command is I need to extract everything from my current RT database in order
> for me to be able to import it on my new server without having to initialise
> the database first.
> 
> The file I am trying to import was created using pg_dump -f ${Dump_File}
> rtdb.
> 
> I am aware of numerous options to pg_dump, but inexperience means I don't
> know which ones to employ in order to get a dump of my RT database with full
> integrity to enable a seamless import.
> 
> Can someone enlighten me as to exactly how I should use pg_dump to get my
> data in a suitable format to enable me to simply import it with psql -f
> datafile.sql so I can dop the upgrade cleanly ?
> 
> 
> 
> 
> --
> View this message in context: http://requesttracker.8502.n7.nabble.com/Problems-upgrading-from-3-9-3-tp53543p53598.html
> Sent from the Request Tracker - User mailing list archive at Nabble.com.
> 
> 
> ------------------------------
> 
> --------
> rt-users mailing list
> rt-users at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> 
> 
> End of rt-users Digest, Vol 109, Issue 32
> *****************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130424/f30f7085/attachment.htm>


More information about the rt-users mailing list