<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Eh, it's something else also...<div><br></div><div>I had reverted to earlier images of the source & destination </div><div><br></div><div>That had shown the error when Assets were enabled and then no error when Assets were disabled</div><div><br></div><div>But now back on the current images - I still get an error on import</div><div><br></div><div><div>[1249] [Fri Aug 1 22:49:40 2014] [warning]:</div><div>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)</div></div><div><br></div><div>Crap !</div><div><br></div><div><br></div><div><br><div><div>On Aug 1, 2014, at 6:15 PM, Al Joslin <<a href="mailto:allen.joslin@gmail.com">allen.joslin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Damn -- it's the Assets !!<div><br></div><div>You seem to get a bad export if you've Assets enabled in your RT_SiteConfig.pm</div><div><br></div><div>I commented out the Assets extension in the Site config and ran the serialize</div><div><br></div><div>Then I was able to run the import (even with Assets enabled)</div><div><br></div><div>So I only have to copy my Asset structures manually </div><div><br></div><div>a PITA but do-able</div><div><br></div><div>al;</div><div><br></div><div><br></div><div><br><div><div>On Aug 1, 2014, at 5:16 PM, Al Joslin <<a href="mailto:allen.joslin@gmail.com">allen.joslin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div>I have an RT 4.2.5 w/Assets 1.01 over mysql Ver 14.14 on Ubuntu 14.04 as my first RT </div><div><br></div><div>I have brought up RT 4.2.6 w/Assets 1.01 over mariadb Ver 15.1 on CentOS 6.5</div><div><br></div><div>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)</div><div><br></div><div>The serializer gave me these errors -- totally impenetrable to me...</div><div><br></div><div>---------</div><div><font face="Courier" size="2">root@rt4:/home/ajoslin# /opt/rt4/sbin/rt-serializer --no-tickets --scrip --quiet --force --directory 2014-08-01</font></div><div><font face="Courier" size="2">Logging warnings and errors to 2014-08-01/serializer.log</font></div><div><font face="Courier" size="2">[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)</font></div><div><font face="Courier" size="2">Trace begun at /opt/rt4/sbin/../lib/RT.pm line 297</font></div><div><font face="Courier" size="2">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</font></div><div><font face="Courier" size="2">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</font></div><div><font face="Courier" size="2">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</font></div><div><font face="Courier" size="2">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</font></div><div><font face="Courier" size="2">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</font></div><div><font face="Courier" size="2">RT::DependencyWalker::Walk('RT::Migrate::Serializer::File=HASH(0x7c64160)') called at /opt/rt4/sbin/../lib/RT/Migrate/Serializer/File.pm line 106</font></div><div><font face="Courier" size="2">RT::Migrate::Serializer::File::Export('RT::Migrate::Serializer::File=HASH(0x7c64160)') called at /opt/rt4/sbin/rt-serializer line 165</font></div><div><font face="Courier" size="2">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.</font></div><div>---------</div><div><br></div><div>when I run it without --scrip there are no errors, but it's odd that the scrip (appended to this message) runs just fine...</div><div><br></div><div>There are no assets, and there seems to be no serializer/importer for Assets -- is one in the works?</div><div><br></div><div><br></div><div><br></div><div><br></div><div>So then I run the importer and it craps out</div><div><br></div><div>---------</div><div><font face="Courier" size="2">sudo /opt/rt4/sbin/rt-importer 2014-08-01</font></div><div><font face="Courier" size="2">[1266] [Fri Aug 1 21:05:22 2014] [warning]:</font></div><div><font face="Courier" size="2">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)</font></div><div><font face="Courier" size="2"><br></font></div><div><font face="Courier" size="2">Importer state has been written to the file:</font></div><div><font face="Courier" size="2"> 2014-08-01/partial-import</font></div><div><font face="Courier" size="2"><br></font></div><div><font face="Courier" size="2"><br></font></div><div><font face="Courier" size="2">It may be possible to resume the import by re-running rt-importer.</font></div><div>---------</div><div><br></div><div>The importer state is not human readable [to me]</div></div><div><br></div><div><br></div><div><br></div><div>What should I be trying to do next ?</div><div>thanks</div><div>al;</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>my one and only scrip (so far :)</div><div><br></div><div>custom condition:</div><div>---------</div><div><div># only attempt this Scrip if it's a comment or correspond</div><div>if ( ($self->TransactionObj()->Type() == "Comment") </div><div> or ($self->TransactionObj()->Type() == "Correspond") ) {</div><div><br></div><div> # only execute this action on Help Desk queues</div><div> return 1 if ($self->TicketObj->QueueObj->Name() =~ /Help Desk/);</div><div><br></div><div>}</div><div><br></div><div>return 0;</div></div><div>---------</div><div><br></div><div><br></div><div><br></div><div>custom action prep:</div><div>---------</div><div>return 1;</div><div>---------</div><div><br></div><div><br></div><div><br></div><div>custom action commit:</div><div>---------</div><div># calculation result</div><div><div>my $job_cost = 0.00;</div><div><br></div><div># loop the recorded transactions</div><div>my $allTrans = $self->TicketObj()->Transactions();</div><div>while( my $eachTrans = $allTrans->Next() ) {</div><div><br></div><div> # get the entered cost for this transaction & reduce it to the 1st floating point value in the field</div><div> my $eachCost = $eachTrans-> CustomFieldValuesAsString('Billing');</div><div> if (-1 != index($eachCost,",")) { $eachCost = substr($eachCost,0,index($eachCost,",")); }</div><div> if (-1 != index($eachCost,"\$")) { $eachCost =~ tr/$//d; }</div><div><br></div><div> # if there was any time taken then $eachCost is a per-hour value</div><div> my $timeTaken = $eachTrans->TimeTaken();</div><div> if ($timeTaken and $eachCost) { $eachCost = $timeTaken * ($eachCost /60); }</div><div><br></div><div> # if we found anything then add it</div><div> if ($eachCost) { $job_cost += $eachCost; }</div><div>}</div><div><br></div><div># make a nice display string</div><div>$job_cost = sprintf( "\$%.2f", $job_cost );</div><div><br></div><div># write out the tally</div><div>my $jobCostCF = new RT::CustomField($self->CurrentUser());</div><div>$jobCostCF->LoadByName( Name => 'JobCost', LookupType => RT::Ticket->CustomFieldLookupType);</div><div>$self->TicketObj()->AddCustomFieldValue( Field => $jobCostCF, Value => $job_cost );</div><div><br></div><div>return 1;</div></div><div>---------</div><div><br></div><div><br></div></div></blockquote></div><br></div></div></blockquote></div><br></div></body></html>