[Rt-commit] [rtir] 17/19: When linking an incident to a another ticket, make sure to take Strict Constituency Linking into account

Jesse Vincent jesse at bestpractical.com
Wed Mar 25 00:21:02 EDT 2015


This is an automated email from the git hooks/post-receive script.

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit b51842c8b3ff0ab65214eefaf31ae453edd6efbc
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 24 20:56:30 2015 -0700

    When linking an incident to a another ticket, make sure
    to take Strict Constituency Linking into account
---
 html/RTIR/Incident/Display.html | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 59ee57b..46600aa 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -195,6 +195,14 @@ my $DoLinks = sub {
 
     my %args = ();
 
+    if (RT::IR->StrictConstituencyLinking) {
+        if (RT::IR->ConstituencyFor($child) 
+            != RT::IR->ConstituencyFor($parent)) {
+            return loc("Link failed: Ticket #[_1] is associated with a different constituency", 
+            $child->id );
+        }
+    }
+
     # Blocks or Incedent Reports can have multiple incidents
     my $Type = RT::IR::TicketType( Ticket => $child );
     my $config = RT->Config->Get('RTIR_IncidentChildren')->{$Type};

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list