[Rt-commit] r20015 - rtir/2.5/trunk/html/RTIR
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jun 18 05:25:56 EDT 2009
Author: sunnavy
Date: Thu Jun 18 05:25:51 2009
New Revision: 20015
Modified:
rtir/2.5/trunk/html/RTIR/Create.html
Log:
update the constituency check when creating: we use RT's CF edit component now
Modified: rtir/2.5/trunk/html/RTIR/Create.html
==============================================================================
--- rtir/2.5/trunk/html/RTIR/Create.html (original)
+++ rtir/2.5/trunk/html/RTIR/Create.html Thu Jun 18 05:25:51 2009
@@ -270,6 +270,11 @@
my (@results, $checks_failure, $skip_create);
$skip_create = !$ARGS{'Create'};
+my $constituency_cf = RT::CustomField->new( $RT::SystemUser );
+$constituency_cf->LoadByNameAndQueue( Name => 'Constituency', Queue => $Queue );
+my $constituency_field =
+ 'Object-RT::Ticket--CustomField-' . $constituency_cf->id .'-Values';
+
my $IncidentObj;
if ( $Incident ) {
$IncidentObj = RT::Ticket->new( $session{'CurrentUser'} );
@@ -284,7 +289,7 @@
}
elsif ( !$skip_create
&& RT->Config->Get('_RTIR_Constituency_Propagation') eq 'reject'
- && lc $ARGS{$ARGS{'Constituency'}} ne lc $IncidentObj->FirstCustomFieldValue('Constituency') )
+ && lc $ARGS{$constituency_field} ne lc $IncidentObj->FirstCustomFieldValue('Constituency') )
{
push @results, loc('Incident #[_1] has constituency [_2], choose the same value for a new ticket or use another Incident', $Incident, $IncidentObj->FirstCustomFieldValue('Constituency') );
($checks_failure, $IncidentObj, $Incident) = (1, undef, undef);
More information about the Rt-commit
mailing list