[rt-users] rt-serializer errors, followed by ft-importer errors

Al Joslin allen.joslin at gmail.com
Sun Aug 3 06:45:41 EDT 2014


Permissions are not migrated either...


On Aug 1, 2014, at 6:15 PM, Al Joslin <allen.joslin at gmail.com> wrote:

> Damn -- it's the Assets !!
> 
> You seem to get a bad export if you've Assets enabled in your RT_SiteConfig.pm
> 
> I commented out the Assets extension in the Site config and ran the serialize
> 
> Then I was able to run the import (even with Assets enabled)
> 
> So I only have to copy my Asset structures manually 
> 
> a PITA but do-able
> 
> al;
> 
> 
> 
> On Aug 1, 2014, at 5:16 PM, Al Joslin <allen.joslin at gmail.com> wrote:
> 
>> I have an RT 4.2.5 w/Assets 1.01 over mysql  Ver 14.14 on Ubuntu 14.04 as my first RT 
>> 
>> I have brought up RT 4.2.6 w/Assets 1.01 over mariadb  Ver 15.1 on CentOS 6.5
>> 
>> As maria is a drop-in replacement for mysql I didn't use the --clone option (anyway I don't want any of the 3K practice tickets)
>> 
>> The serializer gave me these errors -- totally impenetrable to me...
>> 
>> ---------
>> root at rt4:/home/ajoslin# /opt/rt4/sbin/rt-serializer --no-tickets --scrip --quiet --force --directory 2014-08-01
>> Logging warnings and errors to 2014-08-01/serializer.log
>> [2236] [Fri Aug  1 20:16:21 2014] [critical]: Can't locate object method "Id" via package "No object mapping for field" (perhaps you forgot to load "No object mapping for field"?) at /opt/rt4/sbin/../lib/RT/Scrip.pm line 1100. (/opt/rt4/sbin/../lib/RT.pm:393)
>> Trace begun at /opt/rt4/sbin/../lib/RT.pm line 297
>> Log::Dispatch::__ANON__('Log::Dispatch=HASH(0x454c468)', 'Can\'t locate object method "Id" via package "No object mapping for field" (perhaps you forgot to load "No object mapping for field"?) at /opt/rt4/sbin/../lib/RT/Scrip.pm line 1100.^J') called at /opt/rt4/sbin/../lib/RT.pm line 393
>> RT::__ANON__('Can\'t locate object method "Id" via package "No object mapping for field" (perhaps you forgot to load "No object mapping for field"?) at /opt/rt4/sbin/../lib/RT/Scrip.pm line 1100.^J') called at /opt/rt4/sbin/../lib/RT/Scrip.pm line 1100
>> RT::Scrip::FindDependencies('RT::Scrip=HASH(0x7cf8ba8)', 'RT::Migrate::Serializer::File=HASH(0x7c64160)', 'RT::DependencyWalker::FindDependencies=HASH(0x7ceba38)') called at /opt/rt4/sbin/../lib/RT/DependencyWalker.pm line 222
>> RT::DependencyWalker::Process('RT::Migrate::Serializer::File=HASH(0x7c64160)', 'object', 'RT::Scrips=HASH(0x7c6ba70)', 'object', 'RT::Scrip=HASH(0x7cf8ba8)') called at /opt/rt4/sbin/../lib/RT/Migrate/Serializer.pm line 372
>> RT::Migrate::Serializer::Process('RT::Migrate::Serializer::File=HASH(0x7c64160)', 'object', 'RT::Scrips=HASH(0x7c6ba70)', 'object', 'RT::Scrip=HASH(0x7cf8ba8)') called at /opt/rt4/sbin/../lib/RT/DependencyWalker.pm line 135
>> RT::DependencyWalker::Walk('RT::Migrate::Serializer::File=HASH(0x7c64160)') called at /opt/rt4/sbin/../lib/RT/Migrate/Serializer/File.pm line 106
>> RT::Migrate::Serializer::File::Export('RT::Migrate::Serializer::File=HASH(0x7c64160)') called at /opt/rt4/sbin/rt-serializer line 165
>> Can't locate object method "Id" via package "No object mapping for field" (perhaps you forgot to load "No object mapping for field"?) at /opt/rt4/sbin/../lib/RT/Scrip.pm line 1100.
>> ---------
>> 
>> when I run it without --scrip there are no errors, but it's odd that the scrip (appended to this message) runs just fine...
>> 
>> There are no assets, and there seems to be no serializer/importer for Assets -- is one in the works?
>> 
>> 
>> 
>> 
>> So then I run the importer and it craps out
>> 
>> ---------
>> sudo /opt/rt4/sbin/rt-importer 2014-08-01
>> [1266] [Fri Aug  1 21:05:22 2014] [warning]:
>> Can't call method "URI" on an undefined value at /opt/rt4/sbin/../lib/RT/Transaction.pm line 1969. (/opt/rt4/sbin/../lib/RT/Migrate/Importer/File.pm:97)
>> 
>> Importer state has been written to the file:
>>     2014-08-01/partial-import
>> 
>> 
>> It may be possible to resume the import by re-running rt-importer.
>> ---------
>> 
>> The importer state is not human readable [to me]
>> 
>> 
>> 
>> What should I be trying to do next ?
>> thanks
>> al;
>> 
>> 
>> 
>> 
>> 
>> my one and only scrip (so far :)
>> 
>> custom condition:
>> ---------
>> # only attempt this Scrip if it's a comment or correspond
>> if (   ($self->TransactionObj()->Type() == "Comment") 
>>    or ($self->TransactionObj()->Type() == "Correspond")  ) {
>> 
>>    # only execute this action on Help Desk queues
>>    return 1 if ($self->TicketObj->QueueObj->Name() =~ /Help Desk/);
>> 
>> }
>> 
>> return 0;
>> ---------
>> 
>> 
>> 
>> custom action prep:
>> ---------
>> return 1;
>> ---------
>> 
>> 
>> 
>> custom action commit:
>> ---------
>> # calculation result
>> my $job_cost = 0.00;
>> 
>> # loop the recorded transactions
>> my $allTrans = $self->TicketObj()->Transactions();
>> while( my $eachTrans = $allTrans->Next() ) {
>> 
>>    # get the entered cost for this transaction & reduce it to the 1st floating point value in the field
>>    my $eachCost = $eachTrans-> CustomFieldValuesAsString('Billing');
>>    if (-1 != index($eachCost,",")) { $eachCost = substr($eachCost,0,index($eachCost,",")); }
>>    if (-1 != index($eachCost,"\$")) { $eachCost =~ tr/$//d; }
>> 
>>    # if there was any time taken then $eachCost is a per-hour value
>>    my $timeTaken = $eachTrans->TimeTaken();
>>    if ($timeTaken and $eachCost) { $eachCost = $timeTaken * ($eachCost /60); }
>> 
>>    # if we found anything then add it
>>    if ($eachCost) { $job_cost += $eachCost; }
>> }
>> 
>> # make a nice display string
>> $job_cost = sprintf( "\$%.2f", $job_cost );
>> 
>> # write out the tally
>> my $jobCostCF = new RT::CustomField($self->CurrentUser());
>> $jobCostCF->LoadByName( Name => 'JobCost', LookupType => RT::Ticket->CustomFieldLookupType);
>> $self->TicketObj()->AddCustomFieldValue( Field => $jobCostCF, Value => $job_cost );
>> 
>> return 1;
>> ---------
>> 
>> 
> 

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


More information about the rt-users mailing list