[Rt-commit] rtir branch 5.0/process-articles created. 5.0.3-13-ga64450bc

BPS Git Server git at git.bestpractical.com
Tue Apr 4 13:40:00 UTC 2023


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/process-articles has been created
        at  a64450bcfead1a0280c642054117c60e5e6f55b7 (commit)

- Log -----------------------------------------------------------------
commit a64450bcfead1a0280c642054117c60e5e6f55b7
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Wed Mar 29 17:09:04 2023 -0300

    Update RTIR Tutorial with Process Articles information

diff --git a/docs/Tutorial.pod b/docs/Tutorial.pod
index 8e8aee81..0749f4b9 100644
--- a/docs/Tutorial.pod
+++ b/docs/Tutorial.pod
@@ -334,6 +334,24 @@ You will be required to provide one or more correspondents.
 To create a new Countermeasure, create a new ticket in the Countermeasures
 queue. You will be required to link the Countermeasure to an Incident.
 
+=head2 Procedures for Incident Response
+
+Since RT 5.0.4 it's possible to create custom procedures that are shown
+on the Ticket Display page, in a privileged section that helps staff to
+follow a specific workflow.
+
+You can know more about procedures in the RT documentation:
+F<docs/customizing/articles_introduction.pod>
+
+In RTIR we provide a default skeleton for Incident Response procedures, one per
+the default Incident Classifications that comes with the system.
+You can customize them and create new ones at Articles, under the Incident
+Procedures Class.
+
+After creating a new procedure, remember to update the %ProcessArticleMapping
+configuration setting and others that may apply, as described in the RT
+documentation.
+
 =head2 Managing 'RT at glance' and 'RTIR at a glance' Pages
 
 You can add, delete, or reorder portlets on the RT and RTIR at a glance

commit 173ad1ae3bf786a80bdb9192ab1a96dc23dd73b7
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Mar 30 16:57:06 2023 -0300

    Update Upgrading instructions with Process Articles information
    
    Added it to 5.0.3 and earlier versions section. Process Articles
    content for RTIR will not be deployed by default on upgrades, so
    we instruct users to do it manually.

diff --git a/docs/UPGRADING-5.0 b/docs/UPGRADING-5.0
index b7c43498..238a338d 100644
--- a/docs/UPGRADING-5.0
+++ b/docs/UPGRADING-5.0
@@ -242,4 +242,23 @@ moving the scrip to Batch mode may restore the previous behavior.
 
 =back
 
+=head1 UPGRADING FROM 5.0.3 AND EARLIER
+
+=over 4
+
+=item * Processes Articles for Incidents
+
+Starting with RTIR 5.0.4, we include a new portlet on the Incident page
+which can show the process the be followed for an Incident according to
+its Classification.
+
+This feature comes enabled in a fresh RTIR install, but you need to enable
+it manually if you are upgrading from a previous version. To enable it,
+run the following commands after upgrading RTIR:
+
+    cd /opt/rt5
+    sbin/rt-setup-database --action insert --datafile local/plugins/RT-IR/etc/upgrade/process_articles_initialdata
+
+=back
+
 =cut

commit 447822333d3c32c10f88b4c0cf6419ddf3f38355
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Mar 30 16:45:47 2023 -0300

    Update initialdata with Process Articles for RTIR

diff --git a/etc/initialdata b/etc/initialdata
index 1b720a2d..1bd2d19a 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -669,6 +669,82 @@ for my $cf (@CustomFields) {
         );
 }
 
+ at Classes = (
+    {
+        Name => 'Incidents Processes',
+        Description => 'Procedures to be followed in the event of an incident',
+    }
+);
+
+ at Articles = (
+    {
+        Name => 'Spam Process',
+        Summary => 'This is the summary of the process for handling spam',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling spam',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'System Compromise Process',
+        Summary => 'This is the summary of the process for handling system compromise',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling system compromise',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Query Process',
+        Summary => 'This is the summary of the process for handling queries',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling queries',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Scan Process',
+        Summary => 'This is the summary of the process for handling scans',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling scans',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Denial of Service Process',
+        Summary => 'This is the summary of the process for handling denial of service',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling denial of service',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Piracy Process',
+        Summary => 'This is the summary of the process for handling piracy',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling piracy',
+            },
+        ],
+        Class => 'Incidents Processes',
+    }
+);
+
 @Final = (
     sub {
         $| = 1;
@@ -817,5 +893,20 @@ for my $cf (@CustomFields) {
             RT->Logger->error("Couldn't create dashboard RTIR Homepage: $msg");
         }
     },
+    sub {
+        $| = 1;
+        my $CurrentUser = RT::CurrentUser->new();
+        $CurrentUser->LoadByName('RT_System');
+
+        require RT::Class;
+        my $class = RT::Class->new($CurrentUser);
+        $class->Load('Incidents Processes');
+
+        my $group = RT::Group->new($CurrentUser);
+        $group->LoadUserDefinedGroup("DutyTeam");
+        die "Can't load group" unless $group->Id;
+        $group->PrincipalObj->GrantRight( Right => $_, Object => $class )
+            for qw/ShowArticle SeeCustomField/;
+        }
 );
 

commit 2c0d6ba01ed1d51c51cc7208f22331fb4232e778
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Wed Mar 29 17:06:48 2023 -0300

    Add Process Articles to RTIR Incidents
    
    Adds a simple skeleton with a new class called Incidents Processes and
    a Article for each of the defaults Incident Classifications.

diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 8d836ef0..f97b5c7f 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -640,6 +640,38 @@ By default RTIR enables 'httpurl_overwrite', 'ip', 'email' and 'domain'.
 
 Set(@Active_MakeClicky, qw(httpurl_overwrite ip email domain));
 
+=item Process Articles related settings
+
+The following settings enables the Process Articles at Incidents Display
+page by default in RTIR:
+
+    %ProcessArticleFields
+    %ProcessArticleMapping
+
+You can see additional information about how to manage Process Articles at
+RT documentation: F<docs/customizing/articles_introduction.pod>
+
+=cut
+
+Set(%ProcessArticleFields,
+    (   Incidents =>
+            { Field => 'CF.Classification', Class => 'Incidents Processes' },
+    )
+   );
+
+Set(%ProcessArticleMapping,
+    (   'CF.Classification' => {
+            'Spam'              => 'Spam Process',
+            'System Compromise' => 'System Compromise Process',
+            'Query'             => 'Query Process',
+            'Scan'              => 'Scan Process',
+            'Denial of Service' => 'Denial of Service Process',
+            'Piracy'            => 'Piracy Process',
+        },
+    )
+   );
+
+
 =back
 
 =head1 Custom Fields
diff --git a/etc/upgrade/process_articles_initialdata b/etc/upgrade/process_articles_initialdata
new file mode 100644
index 00000000..24f8863c
--- /dev/null
+++ b/etc/upgrade/process_articles_initialdata
@@ -0,0 +1,95 @@
+ at Classes = (
+    {
+        Name => 'Incidents Processes',
+        Description => 'Procedures to be followed in the event of an incident',
+    }
+);
+
+ at Articles = (
+    {
+        Name => 'Spam Process',
+        Summary => 'This is the summary of the process for handling spam',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling spam',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'System Compromise Process',
+        Summary => 'This is the summary of the process for handling system compromise',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling system compromise',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Query Process',
+        Summary => 'This is the summary of the process for handling queries',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling queries',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Scan Process',
+        Summary => 'This is the summary of the process for handling scans',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling scans',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Denial of Service Process',
+        Summary => 'This is the summary of the process for handling denial of service',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling denial of service',
+            },
+        ],
+        Class => 'Incidents Processes',
+    },
+    {
+        Name => 'Piracy Process',
+        Summary => 'This is the summary of the process for handling piracy',
+        CustomFields => [
+            {
+                CustomField  => 'Content',
+                Content => 'This is the content of the process for handling piracy',
+            },
+        ],
+        Class => 'Incidents Processes',
+    }
+);
+
+ at Final = (
+    sub {
+        $| = 1;
+        my $CurrentUser = RT::CurrentUser->new();
+        $CurrentUser->LoadByName('RT_System');
+
+        require RT::Class;
+        my $class = RT::Class->new($CurrentUser);
+        $class->Load('Incidents Processes');
+
+        my $group = RT::Group->new($CurrentUser);
+        $group->LoadUserDefinedGroup("DutyTeam");
+        die "Can't load group" unless $group->Id;
+        $group->PrincipalObj->GrantRight( Right => $_, Object => $class )
+            for qw/ShowArticle SeeCustomField/;
+    }
+);
+
+1;
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index 36a5fc7b..4262c48b 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -270,6 +270,8 @@
 % }
     </&>
 
+    <& /Elements/ShowArticle, Ticket => $Ticket &>
+
 <%PERL>
     my $dates_url      = RT::IR->HREFTo("Edit.html?id=".$Ticket->Id);
     my $dates_inline   = sprintf( $modify_inline, $m->interp->apply_escapes( $dates_url, 'h' ) );
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index e384faa2..2e08a17f 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -298,6 +298,8 @@
   <div class="boxcontainer col-md-6">
 % $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'RightColumnStart' );
 
+<& /Elements/ShowArticle, Ticket => $TicketObj &>
+
 <& /Ticket/Elements/ShowLinkedQueues,
     TicketObj => $TicketObj,
 &>

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


hooks/post-receive
-- 
rtir


More information about the rt-commit mailing list