[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.3-188-gc40926024

Jim Brandt jbrandt at bestpractical.com
Wed Jan 9 15:17:42 EST 2019


The branch, 4.4-trunk has been updated
       via  c409260246bdbb44d6f8865cf06a467e64e420f6 (commit)
       via  421f0eb013e9d2c08fee90a072113c1123faea3f (commit)
       via  0134aa421d18bad288ce2af5363cf12ce740a438 (commit)
       via  47593572803a6dba771bd81c8d8cc071bd5b1534 (commit)
       via  5b253a5553fe5db76968b8ee685087b5289db26f (commit)
       via  f0c2b5fe8ab8260663e5e1375859db0466df42b8 (commit)
      from  89777522138202acd01351ed8e4b73c3244a9f4c (commit)

Summary of changes:
 docs/GDPR.pod                                 | 14 ++++++++++++--
 etc/RT_Config.pm.in                           | 17 ++++++++++-------
 share/html/SelfService/Elements/RequestUpdate | 12 ++----------
 share/html/SelfService/Prefs.html             | 20 ++++++++++++++++----
 4 files changed, 40 insertions(+), 23 deletions(-)

- Log -----------------------------------------------------------------
commit f0c2b5fe8ab8260663e5e1375859db0466df42b8
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 5 04:43:12 2019 +0800

    Rename $SelfServiceRequestUpdatePortlet to $SelfServiceRequestUpdateQueue
    
    This is to set the queue that stores user info update requests in
    config.  Empty $SelfServiceRequestUpdateQueue means to disable this
    feature.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 6daff76fd..54e5949e7 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1867,17 +1867,20 @@ all of their stored RT user information.
 
 Set($SelfServiceUserPrefs, 'edit-prefs');
 
-=item C<$SelfServiceRequestUpdatePortlet>
+=item C<$SelfServiceRequestUpdateQueue>
 
-Set this to 1 to allow Self Service users to request updates to
-their RT user information. When enabled, this portlet adds a quick
-ticket create portlet to the Self Service preferences page. This
-option is only available when $SelfServiceUserPrefs is set to
-'view-info' or 'edit-prefs-view-info'.
+Set this to the name of the queue to use for tickets requesting updates
+to user infomation from Self Service users. Once it's set, a quick
+ticket create portlet will show up on Preferences page for self service
+users. This option is only available when $SelfServiceUserPrefs is set
+to 'view-info' or 'edit-prefs-view-info'.
+
+Self service users need the CreateTicket right on this queue to create
+a ticket.
 
 =cut
 
-Set($SelfServiceRequestUpdatePortlet, 0);
+Set($SelfServiceRequestUpdateQueue, undef);
 
 =item C<$SelfServiceDownloadUserData>
 
diff --git a/share/html/SelfService/Elements/RequestUpdate b/share/html/SelfService/Elements/RequestUpdate
index 538c417d5..7f6b9b7ff 100644
--- a/share/html/SelfService/Elements/RequestUpdate
+++ b/share/html/SelfService/Elements/RequestUpdate
@@ -58,10 +58,6 @@ action="<%RT->Config->Get('WebPath')%><% $r->path_info %>"
             <td class="label"><&|/l&>Subject</&>:</td>
             <td colspan="3" class="value"><input type="text" size="50" name="Subject" value="<% $args->{Subject} || '' %>" /></td>
         </tr>
-        <tr class="input-row">
-            <td class="label"><&|/l&>Queue</&>:</td>
-            <td class="value"><& /Elements/SelectNewTicketQueue, Name => 'Queue', Default => $args->{Queue} &></td>
-        </tr>
         <tr>
             <td class="label"><&|/l&>Requestors</&>:</td>
             <td colspan="3" class="value"><& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $args->{Requestors} || $session{CurrentUser}->EmailAddress &></td>
diff --git a/share/html/SelfService/Prefs.html b/share/html/SelfService/Prefs.html
index 19644c981..e34e10603 100644
--- a/share/html/SelfService/Prefs.html
+++ b/share/html/SelfService/Prefs.html
@@ -88,7 +88,7 @@
 % }
 % if ( $pref eq 'view-info' || $pref eq 'edit-prefs-view-info' ) {
 <& /Prefs/Elements/ShowAboutMe, UserObj => $user &>
-%    if ( $request_portlet ) {
+%    if ( $request_queue->id ) {
 <& Elements/RequestUpdate, User=> $user &>
 %    }
 % }
@@ -104,7 +104,14 @@ my $user = $session{'CurrentUser'}->UserObj;
 my $password = [ qw(CurrentPass NewPass1 NewPass2) ];
 
 my $pref = RT->Config->Get( 'SelfServiceUserPrefs' ) || '';
-my $request_portlet = RT->Config->Get( 'SelfServiceRequestUpdatePortlet' );
+my $request_queue = RT::Queue->new( $session{CurrentUser} );
+
+if ( my $queue_name = RT->Config->Get('SelfServiceRequestUpdateQueue') ) {
+    $request_queue->Load($queue_name);
+    unless ( $request_queue->id ) {
+        RT->Logger->error("Couldn't load $queue_name");
+    }
+}
 
 if ( $pref eq 'edit-prefs' || $pref eq 'edit-prefs-view-info' || $pref eq 'full-edit' ) {
 
@@ -151,9 +158,14 @@ if ( $pref eq 'edit-prefs' || $pref eq 'edit-prefs-view-info' || $pref eq 'full-
     }
 }
 
-if ( $request_portlet ) {
+
+if ( $request_queue->id ) {
     my $path = RT->Config->Get('WebPath') . '/SelfService/Prefs.html';
-    push @results, ProcessQuickCreate( Path => $path, ARGSRef => \%ARGS );
+    push @results,
+      ProcessQuickCreate(
+        Path    => $path,
+        ARGSRef => { %ARGS, Queue => $request_queue->id },
+      );
 }
 
 #A hack to make sure that session gets rewritten.

commit 5b253a5553fe5db76968b8ee685087b5289db26f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 5 04:50:13 2019 +0800

    Always set requestor to current user for user info update requests

diff --git a/share/html/SelfService/Elements/RequestUpdate b/share/html/SelfService/Elements/RequestUpdate
index 7f6b9b7ff..08b8d52fd 100644
--- a/share/html/SelfService/Elements/RequestUpdate
+++ b/share/html/SelfService/Elements/RequestUpdate
@@ -58,10 +58,6 @@ action="<%RT->Config->Get('WebPath')%><% $r->path_info %>"
             <td class="label"><&|/l&>Subject</&>:</td>
             <td colspan="3" class="value"><input type="text" size="50" name="Subject" value="<% $args->{Subject} || '' %>" /></td>
         </tr>
-        <tr>
-            <td class="label"><&|/l&>Requestors</&>:</td>
-            <td colspan="3" class="value"><& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $args->{Requestors} || $session{CurrentUser}->EmailAddress &></td>
-        </tr>
         <tr class="input-row">
             <td class="labeltop"><&|/l&>Description</&>:</td>
             <td colspan="3" class="value"><textarea name="Content" cols="50" rows="3"><% $args->{Content} || ''%></textarea></td>
diff --git a/share/html/SelfService/Prefs.html b/share/html/SelfService/Prefs.html
index e34e10603..7b6f79987 100644
--- a/share/html/SelfService/Prefs.html
+++ b/share/html/SelfService/Prefs.html
@@ -164,7 +164,7 @@ if ( $request_queue->id ) {
     push @results,
       ProcessQuickCreate(
         Path    => $path,
-        ARGSRef => { %ARGS, Queue => $request_queue->id },
+        ARGSRef => { %ARGS, Queue => $request_queue->id, Requestors => $session{CurrentUser}->EmailAddress },
       );
 }
 

commit 47593572803a6dba771bd81c8d8cc071bd5b1534
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 5 05:03:09 2019 +0800

    Set a sensible default subject for user info update requests

diff --git a/share/html/SelfService/Elements/RequestUpdate b/share/html/SelfService/Elements/RequestUpdate
index 08b8d52fd..24a9f0a55 100644
--- a/share/html/SelfService/Elements/RequestUpdate
+++ b/share/html/SelfService/Elements/RequestUpdate
@@ -56,7 +56,7 @@ action="<%RT->Config->Get('WebPath')%><% $r->path_info %>"
     <table>
         <tr class="input-row">
             <td class="label"><&|/l&>Subject</&>:</td>
-            <td colspan="3" class="value"><input type="text" size="50" name="Subject" value="<% $args->{Subject} || '' %>" /></td>
+            <td colspan="3" class="value"><input type="text" size="50" name="Subject" value="<% $args->{Subject} || loc('Please update my user information') %>" /></td>
         </tr>
         <tr class="input-row">
             <td class="labeltop"><&|/l&>Description</&>:</td>

commit 0134aa421d18bad288ce2af5363cf12ce740a438
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 5 05:01:52 2019 +0800

    Tweak portlet title to "Request user information update"

diff --git a/share/html/SelfService/Elements/RequestUpdate b/share/html/SelfService/Elements/RequestUpdate
index 24a9f0a55..7bfa3bfba 100644
--- a/share/html/SelfService/Elements/RequestUpdate
+++ b/share/html/SelfService/Elements/RequestUpdate
@@ -46,7 +46,7 @@
 %#
 %# END BPS TAGGED BLOCK }}}
 <div class="quick-create">
-<&| /Widgets/TitleBox, title => loc('Update my user information request') &>
+<&| /Widgets/TitleBox, title => loc('Request user information update') &>
 <div><&|/l&>Please indicate which user fields you would like updated</&></div>
 <form method="post"
 action="<%RT->Config->Get('WebPath')%><% $r->path_info %>"

commit 421f0eb013e9d2c08fee90a072113c1123faea3f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jan 5 05:19:06 2019 +0800

    Update GDPR doc for the feature of SelfServiceRequestUpdateQueue

diff --git a/docs/GDPR.pod b/docs/GDPR.pod
index 41ffa6563..2e8c5e010 100644
--- a/docs/GDPR.pod
+++ b/docs/GDPR.pod
@@ -28,8 +28,18 @@ see and modify their full user record at Logged in as > Settings > About Me.
 Unprivileged users will interact with RT via the Self Service interface or through email only.
 These users are typically customers and will have much less default access in RT. Since there
 are many different relationships with end users, RT offers several different options to
-allow Self Service users to view and edit their user data. All of the options below also
-require the users to have the ModifySelf right.
+allow Self Service users to view and edit their user data. All of the options below except
+C<view-info> also require users to have the ModifySelf right.
+
+For C<view-info> and C<edit-prefs-view-info>, self service users can't update
+their user information directly, but you can provide an easy way for them
+to request an update. If you set L<RT_Config/SelfServiceRequestUpdateQueue> to
+the name of an RT queue, a quick create portlet will appear on the self service
+Preferences page. Users can then easily create a ticket to request updates to
+their user information.
+
+Note that self service users must have the CreateTicket right on the queue you
+select to allow them to create the new request.
 
 L<RT_Config/SelfServiceUserPrefs> has the following options:
 

commit c409260246bdbb44d6f8865cf06a467e64e420f6
Merge: 897775221 421f0eb01
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Jan 9 14:57:19 2019 -0500

    Merge branch '4.4/tweak-request-user-info-update-portlet' into 4.4-trunk


-----------------------------------------------------------------------


More information about the rt-commit mailing list