<div dir="ltr">On 11 August 2014 09:38, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<div><br></div><div>Hi Kevin,</div><div><br></div><div>Thanks for replying to me. See below for the information you mentioned in your post.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">On Fri, Aug 08, 2014 at 11:34:13AM -0700, Landon Stewart wrote:<br>
> Hello RTIR,<br>
><br>
> I've borrowed the code from RTIR_FindIP.pm and modified it so I can specify the<br>
> ticket object to Add and Delete IP addresses. This is so I can iterate through<br>
> child tickets of an Incident and perform the same action on them. I can add IP<br>
> addresses to CF.{IP} but not delete IP addresses though. I'm stumped. Any<br>
> clues about how to delete an IP address from the IP custom field?<br>
<br>
</div>Your line numbers don't line up with the current RT release, so<br>
debugging this is kind of impossible<br>
<a href="https://github.com/bestpractical/rt/blob/stable/lib/RT/ObjectCustomFieldValue.pm#L169" target="_blank">https://github.com/bestpractical/rt/blob/stable/lib/RT/ObjectCustomFieldValue.pm#L169</a></blockquote><div><br>
</div><div>Sorry - I'm using RT v4.0.17 with RTIR v3.0.0rc1. Nothing in the release of either RT or RTIR was modified but new modules have been added. The one I'm dealing with right now is called local/plugins/RT-IR/lib/RT/Action/RTIR_UpdatePF.pm </div>
<div><br></div><div>I've pasted my code at <a href="http://pastebin.com/raw.php?i=APb1ZEPz">http://pastebin.com/raw.php?i=APb1ZEPz</a> with some modifications (the external database call to grab customer data has been removed).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Please provide your RT release, your RTIR release, local modifications<br>
made and enable Stacktraces to better highlight your error.<br>
<a href="http://bestpractical.com/docs/rt/latest/RT_Config.html#LogStackTraces" target="_blank">http://bestpractical.com/docs/rt/latest/RT_Config.html#LogStackTraces</a></blockquote><div><br></div><div>I've enabled $StackTraces with a value of 5 now. Not sure if this provides enough information since it doesn't really indicate what the error might be.</div>
<div><br></div><div><u>The resulting log entries after running this via:</u></div><div>/opt/rt4/bin/rt-crontool --search RT::Search::FromSQL --action RT::Action::RTIR_iWebUpdatePF --transaction first --search-arg "id = 16735422"<br>
</div><div><br></div><div><u>Are: </u><b>(xx.x05.127.6 purposely obfuscated)</b></div><div><div>[Mon Aug 11 17:08:46 2014] [critical]: RT::CustomField::ParseIPRange Unimplemented in RT::ObjectCustomFieldValue. (/opt/rt4/bin/../lib/RT/ObjectCustomFieldValue.pm line 169) (/opt/rt4/bin/../lib/RT.pm:400)</div>
<div>Trace begun at /opt/rt4/bin/../lib/RT.pm line 294</div><div>Log::Dispatch::crit('Log::Dispatch=HASH(0x40eaaf0)', 'RT::CustomField::ParseIPRange Unimplemented in RT::ObjectCustomFieldValue. (/opt/rt4/bin/../lib/RT/ObjectCustomFieldValue.pm line 169) ^J') called at /opt/rt4/bin/../lib/RT.pm line 400</div>
<div>RT::__ANON__('RT::CustomField::ParseIPRange Unimplemented in RT::ObjectCustomFieldValue. (/opt/rt4/bin/../lib/RT/ObjectCustomFieldValue.pm line 169) ^J') called at /usr/share/perl5/DBIx/SearchBuilder/Record.pm line 494</div>
<div>DBIx::SearchBuilder::Record::AUTOLOAD('RT::CustomField=HASH(0x822b700)', xx.x05.127.6) called at /opt/rt4/bin/../lib/RT/ObjectCustomFieldValue.pm line 169</div><div>RT::ObjectCustomFieldValue::LoadByCols('RT::ObjectCustomFieldValue=HASH(0x8228228)', 'Content', xx.x05.127.6, 'CustomField', 68, 'ObjectType', 'RT::Ticket', 'ObjectId', 16735422, 'Disabled', 0) called at /opt/rt4/bin/../lib/RT/ObjectCustomFieldValue.pm line 217</div>
<div>RT::ObjectCustomFieldValue::LoadByObjectContentAndCustomField('RT::ObjectCustomFieldValue=HASH(0x8228228)', 'Object', 'RT::Ticket=HASH(0x805fdd8)', 'Content', xx.x05.127.6, 'CustomField', 68) called at /opt/rt4/bin/../lib/RT/CustomField.pm line 1654</div>
<div>RT::CustomField::DeleteValueForObject('RT::CustomField=HASH(0x822a1e8)', 'Object', 'RT::Ticket=HASH(0x805fdd8)', 'Id', undef, 'Content', xx.x05.127.6) called at /opt/rt4/bin/../lib/RT/Record.pm line 1857</div>
<div>RT::Record::DeleteCustomFieldValue('RT::Ticket=HASH(0x805fdd8)', 'Value', xx.x05.127.6, 'Field', 'RT::CustomField=HASH(0x81eed50)') called at /opt/rt4/local/plugins/RT-IR/lib/RT/Action/RTIR_UpdatePF.pm line 83</div>
<div>RT::Action::RTIR_UpdatePF::RemIP('RT::Action::RTIR_UpdatePF=HASH(0x8072dd0)', 'Ticket', 'RT::Ticket=HASH(0x805fdd8)', 'IP', xx.x05.127.6, 'CustomField', 'RT::CustomField=HASH(0x81eed50)', 'Skip', 'HASH(0x804ef98)') called at /opt/rt4/local/plugins/RT-IR/lib/RT/Action/RTIR_UpdatePF.pm line 46</div>
<div>RT::Action::RTIR_UpdatePF::Commit('RT::Action::RTIR_UpdatePF=HASH(0x8072dd0)') called at /opt/rt4/bin/rt-crontool line 227X</div><div>main::process('RT::Ticket=HASH(0x805fdd8)', 'RT::Transaction=HASH(0x8077500)', undef) called at /opt/rt4/bin/rt-crontool line 176</div>
</div></div><div><br></div>-- <br><div dir="ltr"><div><span style="font-family:arial;font-size:small">Landon Stewart :: </span><a href="mailto:lstewart@iweb.com" style="font-family:arial;font-size:small" target="_blank">lstewart@iweb.com</a><br>
</div><span style="font-family:arial;font-size:small">Lead Specialist, Abuse and Security Management</span><br style="font-family:arial;font-size:small"><span style="font-family:arial;font-size:small">Spécialiste principal, gestion des abus et sécurité</span><br style="font-family:arial;font-size:small">
<span style="font-family:arial;font-size:small"><a href="http://iweb.com" target="_blank">http://iweb.com</a> :: +1 (888) 909-4932</span><br><div><span style="font-family:arial;font-size:small"><br></span></div><div><span style="font-family:arial;font-size:small"><br>
</span></div></div>
</div></div>