[Rt-commit] [rtir] 01/01: Remove more _RTIR prefix code

Kevin Falcone falcone at bestpractical.com
Mon Apr 7 17:16:22 EDT 2014


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

falcone pushed a commit to branch 3.0/add-constituency-cf-rights
in repository rtir.

commit af64dc21b76f6dd55026455f002857f84cebdc01
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Apr 7 17:09:46 2014 -0400

    Remove more _RTIR prefix code
    
    This use of _RTIR was missed during the renaming before 2.6.
    Without 1b6ac90c and this commit, this script really only about 1/3
    worked for the whole 2.6 release series. Constituency duty teams had
    many permissions on tickets, but no access to the relevant custom fields
    unless more work was done to hand those rights out manually.
    
    This takes any CF applied to an IR queue and grants the constituency
    duty team rights on those CFs. This means that new custom CFs added by
    an admin will be picked up (not just core RTIR fields) but this is more
    likely to be what admins want and is simpler than coding a list of CFs
    into the script that will bitrot.
---
 etc/add_constituency.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/etc/add_constituency.in b/etc/add_constituency.in
index 476137b..f5787b2 100644
--- a/etc/add_constituency.in
+++ b/etc/add_constituency.in
@@ -268,7 +268,10 @@ sub grant_group_cf_rights {
     my @rights = (@_);
 
     my $cfs = RT::CustomFields->new($RT::SystemUser);
-    $cfs->Limit( FIELD => 'Name', OPERATOR => 'STARTSWITH', VALUE => '_RTIR' );
+    for my $queue (@queue_prefixes) {
+        my $q = load_queue($queue);
+        $cfs->LimitToObjectId($q->Id);
+    }
     while ( my $cf = $cfs->Next ) {
         debug "Granting rights for custom field ". $cf->Name . " to group ". $group->Name;
 

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


More information about the rt-commit mailing list