[Rt-commit] rtir branch 5.0/resolve-incident-comment created. 5.0.1-21-g24e7480c

BPS Git Server git at git.bestpractical.com
Wed Oct 6 14:27:04 UTC 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rtir".

The branch, 5.0/resolve-incident-comment has been created
        at  24e7480c03f5d81811f181164cd9742525a239a2 (commit)

- Log -----------------------------------------------------------------
commit 24e7480c03f5d81811f181164cd9742525a239a2
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu May 2 10:21:18 2019 -0400

    Allow users to reply/comment incident on reply/resolve children pages
    
    E.g. The resolve page for incidents is built to allow comments to be
    posted to all linked tickets, but does not provide a way to comment on
    the incident ticket itself. Add the incident as an option in the section
    showing the list of tickets to comment on.

diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index fe1288cc..554fe2d5 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -124,6 +124,16 @@
 % }
 % }
 
+<div class="form-row">
+  <div class="col-12">
+    <h4><&|/l&>Incident</&></h4>
+      <div class="custom-control custom-checkbox">
+        <input type="checkbox" id="SelectedIncident" name="SelectedIncident" <% $ARGS{SelectedIncident} ? 'checked="checked"' : '' |n %> value="<% $IncidentObj->Id %>" class="custom-control-input">
+        <label class="custom-control-label" for="SelectedIncident"><b><% loc('Add the correspondence/comment to current incident ticket too') %></b></label>
+      </div>
+  </div>
+</div>
+
 % unless ( $candidates ) {
 <& /Elements/ListActions, actions => loc('Warning: no recipients!'), titlebox => { class => 'error-titlebox' } &>
 % }
@@ -212,6 +222,12 @@ if ( $SubmitTicket && !$checks_failure ) {
             );
         }
     }
+
+    if ( $SelectedIncident ) {
+        push @results, map { loc("Ticket [_1]: [_2]", $id, $_) }
+            ProcessUpdateMessage( TicketObj => $IncidentObj, ARGSRef => \%ARGS, KeepAttachments => 1 );
+    }
+
     # manually clear this out since we told ProcessUpdateMessage to KeepAttachments
     delete $session{'Attachments'}{ $ARGS{'Token'} };
 
@@ -299,5 +315,6 @@ $Order           => RT->Config->Get('DefaultSearchResultOrder')
 @SelectedReports         => ()
 @SelectedInvestigations  => ()
 @SelectedCountermeasures => ()
+$SelectedIncident        => undef
 $SubmitTicket            => 0
 </%ARGS>

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


hooks/post-receive
-- 
rtir


More information about the rt-commit mailing list