[Rt-commit] rt branch, 4.2/approvals-edit, created. rt-4.2.3-84-g112a589

Alex Vandiver alexmv at bestpractical.com
Mon Apr 7 15:15:10 EDT 2014


The branch, 4.2/approvals-edit has been created
        at  112a589495b5467ab370a8981496f7e137959e9e (commit)

- Log -----------------------------------------------------------------
commit 1f410fbb7104c3a7858f26ea606bd6749caa77a2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Apr 7 15:05:49 2014 -0400

    Hide queue name for __Approvals
    
    Renaming the __Approvals queue would break approvals, which load it by name

diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index 98f1f5c..3afb5d0 100644
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -56,9 +56,13 @@
 <input type="hidden" class="hidden" name="id" value="<% $Create? 'new': $QueueObj->Id %>" />
 
 <table>
-<tr><td align="right"><&|/l&>Queue Name</&>:</td>
-<td colspan="3"><input name="Name" value="<% $Create ? "" : $QueueObj->Name || $Name %>" /></td>
-</tr>
+<tr><td align="right"><&|/l&>Queue Name</&>:</td><td colspan="3">
+% if ($InternalQueue) {
+<% $QueueObj->Name %>
+% } else {
+<input name="Name" value="<% $Create ? "" : $QueueObj->Name || $Name %>" />
+% }
+</td></tr>
 
 <tr><td align="right"><&|/l&>Description</&>:</td>
 <td colspan="3"><input name="Description" value="<% $Create ? "" : $QueueObj->Description || $Description || '' %>" size="60" /></td>
@@ -227,6 +231,8 @@ if ( $QueueObj->Id ) {
     $title = loc("Create a queue");
 }
 
+my $InternalQueue = ($QueueObj->Id and $QueueObj->Disabled == 2);
+
 # This code does automatic redirection if any updates happen.
 MaybeRedirectForResults(
     Actions   => \@results,

commit e02c9b4949abb8ca22501aa657f0ad6036320593
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Apr 7 15:09:05 2014 -0400

    The lifecyles drop-down does not list approvals; prevent changing away from it
    
    Pressing submit on the Approvals queue page set its lifecycle to
    "default", as "approvals" is filtered out of the list of lifecycles to
    display.  Once changed by accident, it is also impossible to undo.  If
    changed intentionally, it may break lifecycles if the new lifecycle
    contains different statuses or transitions.
    
    Prevent this family of errors by hiding the lifecycle dropdown for the
    approvals queue.

diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index 3afb5d0..e3259d2 100644
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -68,14 +68,18 @@
 <td colspan="3"><input name="Description" value="<% $Create ? "" : $QueueObj->Description || $Description || '' %>" size="60" /></td>
 </tr>
 
-<tr><td align="right"><&|/l&>Lifecycle</&>:</td>
-<td colspan="3"><& /Widgets/Form/Select:InputOnly,
+<tr><td align="right"><&|/l&>Lifecycle</&>:</td><td colspan="3">
+% if ($InternalQueue) {
+<% $QueueObj->Lifecycle %>
+% } else {
+<& /Widgets/Form/Select:InputOnly,
     Name         => 'Lifecycle',
     Values       => [ sort { loc($a) cmp loc($b) } RT::Lifecycle->List ],
     CurrentValue => $Create ? "default" : $QueueObj->Lifecycle || $ARGS{'Lifecycle'},
     Default      => 0,
-&></td>
-</tr>
+&>
+% }
+</td></tr>
 
 <tr><td align="right"><&|/l&>Subject Tag</&>:</td>
 <td colspan="3"><input name="SubjectTag" value="<% $ARGS{'SubjectTag'} || ($Create ? "" : $QueueObj->SubjectTag || '' ) %>" size="60" /></td>

commit 112a589495b5467ab370a8981496f7e137959e9e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Apr 7 15:12:56 2014 -0400

    Hide the Disabled box on the Approvals queue
    
    The Approvals queue is flagged by Diabled = 2; this presents as
    "disabled" in the UI.  While marking it "enabled" does not cause many
    problems, attempting to mark it re-Disabled leaves it as Disabled = 1,
    which does not allow tickets to be created in it.
    
    Hide the Disabled box entirely to prevent these sorts of problems.

diff --git a/share/html/Admin/Queues/Modify.html b/share/html/Admin/Queues/Modify.html
index e3259d2..faec382 100644
--- a/share/html/Admin/Queues/Modify.html
+++ b/share/html/Admin/Queues/Modify.html
@@ -129,10 +129,12 @@
 <td colspan="3"><&|/l_unsafe, "<b>","</b>","<i>","</i>"&>Sign all auto-generated mail.  [_1]Caution[_2]: Enabling this option alters the signature from providing [_3]authentication[_4] to providing [_3]integrity[_4].</&></td></tr>
 % }
 
+% unless ($InternalQueue) {
 <tr><td align="right"><input type="checkbox" class="checkbox" id="Enabled" name="Enabled" value="1" <%$EnabledChecked|n%> /></td>
 <td colspan="3"><label for="Enabled"><&|/l&>Enabled (Unchecking this box disables this queue)</&></label><br />
 % $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results );
 </td></tr>
+% }
 
 % if ( RT->Config->Get('Crypt')->{'Enable'} ) {
 <tr><td colspan="4">

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


More information about the rt-commit mailing list