[Rt-commit] rtir branch 5.0/process-articles2 created. 5.0.3-11-g2dfd9804
BPS Git Server
git at git.bestpractical.com
Fri Apr 7 20:31:10 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-articles2 has been created
at 2dfd98047010b8dc3928bca64e2e0aa5fe345185 (commit)
- Log -----------------------------------------------------------------
commit 2dfd98047010b8dc3928bca64e2e0aa5fe345185
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Wed Mar 29 17:09:04 2023 -0300
Update RTIR Admin Tutorial with Process Articles information
diff --git a/docs/AdministrationTutorial.pod b/docs/AdministrationTutorial.pod
index f23e29da..d665835e 100644
--- a/docs/AdministrationTutorial.pod
+++ b/docs/AdministrationTutorial.pod
@@ -131,6 +131,38 @@ Customer for an IR or Investigation.
=back
+=head2 Documenting Process for Incidents
+
+Starting in version 5.0.4, RT supports a feature called Process Articles
+that allows you to document the process for working on a ticket, and
+display it right on the page. The process is managed in an article,
+and which article to show is determined by a field on the ticket.
+
+Starting in RTIR 5.0.4 this feature is available for Incidents. The
+default Classification field contains values to indicate the type of
+the incident. You can set up an article for each of the Classification
+values to document how that type of incident should be handled. Once
+configured, this documentation will be shown right on the incident page.
+
+The configuration options L<ProcessArticleFields|https://docs.bestpractical.com/rt/latest/RT_Config.html#ProcessArticleFields>
+and L<ProcessArticleMapping|https://docs.bestpractical.com/rt/latest/RT_Config.html#ProcessArticleMapping>
+set the article class to use and also determine the mapping between
+the Classification values and corresponding articles. If you have
+added or removed Classification values, you can update this configuration
+with your new settings.
+
+Articles are created in a class called Incidents Processes by default,
+and members of the DutyTeam group can see and modify these articles. You can
+change the rights on the class if you want to restrict who can
+update the documentation.
+
+Edit the articles to add your actual process docuemtnation. Note that if
+you change the article Name field, you need to update the C<%ProcessArticleMapping>
+setting mentioned above because it uses the article name.
+
+This feature is optional and can be disabled by clearing the
+configuration options linked above.
+
=head2 Managing "RT at a glance" and "RTIR at a glance" pages
In the config you can set the C<@RTIR_HomepageComponents> option to control
commit 19d0e6a784ac783b1fcd8c7062cad48ec654df86
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Thu Mar 30 16:57:06 2023 -0300
Update upgrading instructions with Process Articles information
Process Articles content for RTIR will not be deployed by default
on upgrades, so provide instructions for adding it manually.
diff --git a/docs/UPGRADING-5.0 b/docs/UPGRADING-5.0
index b7c43498..e06512f0 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 to be followed for an Incident based on the
+selected Classification.
+
+Default articles for the process documentation are installed in new RTIRs
+by default. For an existing RTIR system, you can also add the starter
+articles by running the following after your upgrade:
+
+ cd /opt/rt5
+ sbin/rt-setup-database --action insert --datafile local/plugins/RT-IR/etc/upgrade/process_articles_initialdata
+
+=back
+
=cut
commit 80f413d87a0517cb7862a8814c8d46c769cd99a9
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Wed Mar 29 17:06:48 2023 -0300
Add Process Articles for Classification
Default article data is installed for new RTIR installations.
Separate initialdata is provided for existing systems for
optional installation.
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 8d836ef0..be018fe0 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -640,6 +640,34 @@ By default RTIR enables 'httpurl_overwrite', 'ip', 'email' and 'domain'.
Set(@Active_MakeClicky, qw(httpurl_overwrite ip email domain));
+=item Process Articles for Incidents
+
+RTIR provides configuration to show process documentation on Incident
+pages based on the selected Classification. You can change this behavior
+via configuration using the options L<ProcessArticleFields|https://docs.bestpractical.com/rt/latest/RT_Config.html#ProcessArticleFields>
+and L<ProcessArticleMapping|https://docs.bestpractical.com/rt/latest/RT_Config.html#ProcessArticleMapping>.
+
+You can see additional information about how to manage Process Articles in
+the RT L<Articles|https://docs.bestpractical.com/rt/latest/customizing/articles_introduction.html>
+documentation.
+
+=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/initialdata b/etc/initialdata
index 1b720a2d..c50d9153 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -669,6 +669,86 @@ for my $cf (@CustomFields) {
);
}
+ at Classes = (
+ {
+ Name => 'Templates',
+ Description => 'Response templates',
+ },
+ {
+ Name => 'Incidents Processes',
+ Description => 'Processes 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 +897,21 @@ for my $cf (@CustomFields) {
RT->Logger->error("Couldn't create dashboard RTIR Homepage: $msg");
}
},
-);
+ sub {
+ my $class = RT::Class->new( RT->SystemUser );
+ my ($ok, $msg) = $class->Load('Incidents Processes');
+ RT->Logger->error("Unable to load class Incidents Processes: $msg") unless $ok;
+
+ my $content = RT::CustomField->new( RT->SystemUser );
+ $content->Load('Content');
+
+ my @skips = ( "Name", "Summary", "LinkToTicket", "CF-Title-" . $content->Id );
+ $class->SetAttribute(Name => "Skip-$_", Content => 1) for @skips;
+ my $group = RT::Group->new( RT->SystemUser );
+ $group->LoadUserDefinedGroup("DutyTeam");
+ die "Can't load group" unless $group->Id;
+ $group->PrincipalObj->GrantRight( Right => $_, Object => $class )
+ for qw/ShowArticle SeeCustomField AdminClass AdminTopics CreateArticle ModifyArticle ModifyArticleTopics SeeClass ShowArticleHistory DeleteArticle/;
+ }
+);
diff --git a/etc/upgrade/process_articles_initialdata b/etc/upgrade/process_articles_initialdata
new file mode 100644
index 00000000..56c46f82
--- /dev/null
+++ b/etc/upgrade/process_articles_initialdata
@@ -0,0 +1,97 @@
+ at Classes = (
+ {
+ Name => 'Incidents Processes',
+ Description => 'Processes 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 {
+ my $class = RT::Class->new( RT->SystemUser );
+ my ($ok, $msg) = $class->Load('Incidents Processes');
+ RT->Logger->error("Unable to load class Incidents Processes: $msg") unless $ok;
+
+ my $content = RT::CustomField->new( RT->SystemUser );
+ $content->Load('Content');
+
+ my @skips = ( "Name", "Summary", "LinkToTicket", "CF-Title-" . $content->Id );
+ $class->SetAttribute(Name => "Skip-$_", Content => 1) for @skips;
+
+ my $group = RT::Group->new( RT->SystemUser );
+ $group->LoadUserDefinedGroup("DutyTeam");
+ die "Can't load group" unless $group->Id;
+ $group->PrincipalObj->GrantRight( Right => $_, Object => $class )
+ for qw/ShowArticle SeeCustomField AdminClass AdminTopics CreateArticle ModifyArticle ModifyArticleTopics SeeClass ShowArticleHistory DeleteArticle/;
+ }
+);
+
+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