[Rt-commit] [rtir] 08/19: Default to limit the incident linking ui to a single constituency, but let the user change it

Jesse Vincent jesse at bestpractical.com
Wed Mar 25 00:20:53 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 406ffdd5bc2fa496f51dcd967f51c443761316bb
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 24 16:39:16 2015 -0700

    Default to limit the incident linking ui to a single constituency, but let the user change it
---
 html/RTIR/Link/FromIncident/index.html |  2 +-
 html/RTIR/Link/ToIncident/index.html   | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/html/RTIR/Link/FromIncident/index.html b/html/RTIR/Link/FromIncident/index.html
index 8669364..4cd0812 100644
--- a/html/RTIR/Link/FromIncident/index.html
+++ b/html/RTIR/Link/FromIncident/index.html
@@ -79,7 +79,7 @@
 $id          => undef
 $Lifecycle       => undef
 
-$Query       => RT::IR->ActiveQuery( Lifecycle => $Lifecycle )
+$Query       => RT::IR->ActiveQuery( Lifecycle => $Lifecycle, Constituency =>  $m->{'RTIR_ConstituencyFilter'} )
 $Format      => RT->Config->Get('RTIRSearchResultFormats')->{'LinkChildren'}
 $Rows        => 50
 $Page        => 1
diff --git a/html/RTIR/Link/ToIncident/index.html b/html/RTIR/Link/ToIncident/index.html
index 435055a..fc8b854 100644
--- a/html/RTIR/Link/ToIncident/index.html
+++ b/html/RTIR/Link/ToIncident/index.html
@@ -92,11 +92,11 @@ $m->callback(CallbackName => 'Initial', %ARGS, Ticket => $Ticket);
 my $Type = RT::IR::TicketType( Ticket => $Ticket );
 my $title = loc( "Link [_1] #[_2] to selected Incident", $Type, $id );
 
-my $BaseQuery = RT::IR->Query(
-    Lifecycle => 'incidents',
-    HasNoMember => $id,
-);
-$Query ||= RT::IR->ActiveQuery( Lifecycle => 'incidents' );
+# BaseQuery is "things that the user can't delete
+my $BaseQuery = RT::IR->Query( HasNoMember => $id, Lifecycle => 'incidents');
+
+# $Query is 'defaults'
+$Query ||= RT::IR->ActiveQuery( Constituency =>  $m->{'RTIR_ConstituencyFilter'});
 
 </%INIT>
 <%ARGS>

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


More information about the rt-commit mailing list