[Rt-commit] rt branch, 4.6/core-group-management-extensions, repushed

Blaine Motsinger blaine at bestpractical.com
Mon Jun 10 17:45:23 EDT 2019


The branch 4.6/core-group-management-extensions was deleted and repushed:
       was 130a70cf8ad09ea4d76a3134d28d621e2af232fb
       now ee574363a47a19fae0169a757daa6d2754fe3358

1: daf81d1be = 1: daf81d1be Core RT-Extension-GroupLinks
2: 0ff9b75cb = 2: 0ff9b75cb Core RT-Extension-GroupSummary
3: 97de34d41 ! 3: c81b45166 Core RT-Extension-GroupSelfService
    @@ -18,40 +18,9 @@
     +
     +Set($SelfServiceShowGroupTickets, 1);
     +
    -+=item C<$GroupSelfServiceOwnerFilterName>
    -+
    -+To populate "My" tickets in Self Service based on Owner rather
    -+than Requestor, create a group CF called 'Group Type' and set
    -+it to the value you configure here. See the main documentation
    -+for more information.
    -+
    -+=cut
    -+
    -+Set($GroupSelfServiceOwnerFilterName, 'Partner');
    -+
      =back
      
      =head2 Articles
    -
    -diff --git a/etc/initialdata b/etc/initialdata
    ---- a/etc/initialdata
    -+++ b/etc/initialdata
    -@@
    -         Type              => 'Text',
    -         MaxValues         => 1,
    -     },
    -+    {
    -+        Name        => 'Group Type',
    -+        Description => 'Define a group type to sort by Owner in Self Service',
    -+        Type        => 'SelectSingle',
    -+        LookupType  => 'RT::Group',
    -+        RenderType  => 'Dropdown',
    -+        Values      => [
    -+            { Name => 'Partner', },
    -+            { Name => 'Customer', },
    -+        ],
    -+    },
    - );
     
     diff --git a/lib/RT/System.pm b/lib/RT/System.pm
     --- a/lib/RT/System.pm
    @@ -228,30 +197,6 @@
     +
     +% $m->callback(CallbackName => 'AfterMyGroupRequests', ARGSRef => \%ARGS, Page => $Page);
     +
    -+<%init>
    -+# Find current user's groups and determine if they are a partner
    -+# Load a system user to see all groups without a rights check on whether
    -+# the current user has ShowGroup.
    -+my $user = RT::User->new(RT->SystemUser);
    -+my ($ret, $msg) = $user->Load($session{'CurrentUser'}->Id);
    -+unless ( $ret ){
    -+    RT::Logger->error("Unable to load user record for user: " . $session{'CurrentUser'}->Name . " :$msg");
    -+    return;
    -+}
    -+my $groups_obj = $user->OwnGroups;
    -+my $is_partner;
    -+
    -+while ( my $group = $groups_obj->Next ){
    -+    if ( $group
    -+        and $group->FirstCustomFieldValue("Group Type")
    -+        and $group->FirstCustomFieldValue("Group Type") eq RT->Config->Get('GroupSelfServiceOwnerFilterName') ){
    -+        $is_partner = 1;
    -+        last;
    -+    }
    -+}
    -+
    -+$ARGS{'SortByRole'} = 'Owner' if $is_partner;
    -+</%init>
      <%ARGS>
      $Page => 1
      </%ARGS>
4: 05543b6a0 = 4: 154790067 Add note to UPGRADING-4.6 for callback changes
5: 130a70cf8 ! 5: ee574363a Remove hardcoded custom field values in tests
    @@ -1,9 +1,10 @@
     Author: Blaine Motsinger <blaine at bestpractical.com>
     
    -    Fix tests for initialdata change
    +    Remove hardcoded custom field values in tests
         
    -    Use the custom field id created through the tests instead of the
    -    previously hardcoded values.
    +    This commit helps future proof tests by removing hardcoded values.
    +    In the event the initialdata changes to include more custom fields,
    +    these tests will no longer fail expecting the hardcoded value.
     
     diff --git a/t/api/customfield.t b/t/api/customfield.t
     --- a/t/api/customfield.t



More information about the rt-commit mailing list