[Rt-commit] r8467 -
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident
ruz at bestpractical.com
ruz at bestpractical.com
Thu Aug 9 00:23:54 EDT 2007
Author: ruz
Date: Thu Aug 9 00:23:54 2007
New Revision: 8467
Modified:
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html
Log:
* constituency propagation 'reject'
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Create.html Thu Aug 9 00:23:54 2007
@@ -255,6 +255,15 @@
push @results, loc( "You must enter a correspondent for the investigation" );
$checks_failure = 1;
}
+
+ if ( $ChildObj && RT->Config->Get('_RTIR_Constituency_Propagation') eq 'reject' ) {
+ unless ( $ARGS{ $ARGS{'Constituency'} }
+ eq $ChildObj->FirstCustomFieldValue('_RTIR_Constituency') )
+ {
+ push @results, loc( "New incident and its child #[_1] must have the same constituency", $ChildObj->id );
+ $checks_failure = 1;
+ }
+ }
}
if ( !$checks_failure && $CreateIncident ) {
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Incident/Display.html Thu Aug 9 00:23:54 2007
@@ -253,13 +253,12 @@
}
Abort('No incident specified') unless $id;
-if($Child) {
- my $ChildObj = RT::Ticket->new( $session{'CurrentUser'} );
+if( $Child ) {
+ my $ChildObj = RT::Ticket->new( $session{'CurrentUser'} );
$ChildObj->Load($Child);
my $lock =$ChildObj->Unlock('Take');
$Duration = time() - $lock->Content->{'Timestamp'} if $lock;
}
-
my $take_or_steal = sub {
@@ -275,6 +274,12 @@
my $DoLinks = sub {
my ($child, $parent) = @_;
+ if ( RT->Config->Get('_RTIR_Constituency_Propagation') eq 'reject' ) {
+ return loc("Couldn't link tickets with different constituencies")
+ unless $child->FirstCustomFieldValue('_RTIR_Constituency')
+ eq $parent->FirstCustomFieldValue('_RTIR_Constituency');
+ }
+
my %args = ();
# Blocks or Incedent Reports can have multiple incidents
More information about the Rt-commit
mailing list