[Bps-public-commit] rt-extension-pagerduty branch doc-updates updated. 31b29b6724d1ec7f53077ad92198c05313b8aa67
BPS Git Server
git at git.bestpractical.com
Fri Jun 17 17:13:56 UTC 2022
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 "rt-extension-pagerduty".
The branch, doc-updates has been updated
via 31b29b6724d1ec7f53077ad92198c05313b8aa67 (commit)
via 207dfb1e7eff096356d8fdd0c8268bbe81ff3c25 (commit)
via bfc8ba31c1f03ab10409276900b905a76ffc1373 (commit)
from 49d86a583fced519e324fb3e9b90dbb9624939ff (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 31b29b6724d1ec7f53077ad92198c05313b8aa67
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Jun 17 13:13:51 2022 -0400
Describe the installed scrips
diff --git a/README b/README
index 73b658f..e8d31d3 100644
--- a/README
+++ b/README
@@ -128,9 +128,16 @@ RT Scrips and Custom Fields
Scrips
This extension will install three new Scrips:
- On Acknowledge PagerDuty Acknowledge
On Create PagerDuty Trigger
+ When a ticket is created, also create an incident in PagerDuty.
+
+ On Acknowledge PagerDuty Acknowledge
+ On any transition from initial status (often 'new') to an active
+ status (often 'open'), send a message to PagerDuty to set the
+ incident as 'Acknowledged'.
+
On Resolve PagerDuty Resolve
+ When a ticket is resolved, resolve the incident in PagerDuty.
They are not applied to any queues when they are initially installed.
Edit the scrips and click "Applies To" to select the queues that should
diff --git a/lib/RT/Extension/PagerDuty.pm b/lib/RT/Extension/PagerDuty.pm
index 094ea8d..9835efc 100644
--- a/lib/RT/Extension/PagerDuty.pm
+++ b/lib/RT/Extension/PagerDuty.pm
@@ -156,12 +156,20 @@ This extension will install three new Scrips:
=over
+=item On Create PagerDuty Trigger
+
+When a ticket is created, also create an incident in PagerDuty.
+
=item On Acknowledge PagerDuty Acknowledge
-=item On Create PagerDuty Trigger
+On any transition from initial status (often 'new') to an active status
+(often 'open'), send a message to PagerDuty to set the incident as
+'Acknowledged'.
=item On Resolve PagerDuty Resolve
+When a ticket is resolved, resolve the incident in PagerDuty.
+
=back
They are not applied to any queues when they are initially installed. Edit
commit 207dfb1e7eff096356d8fdd0c8268bbe81ff3c25
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Jun 17 11:51:21 2022 -0400
Redefine On Acknowledge with StatusChange for open-type events
Scope On Acknowledge to just initial to active transitions
rather than initial to anything. Otherwise resolving a ticket
in 'new' sent an acknowledge then an immediate resolve to
pager duty.
Also redefine using StatusChange since it accepts old and
new statuses as arguments.
diff --git a/etc/initialdata b/etc/initialdata
index 282fcb3..7f2a703 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -22,8 +22,8 @@ our @ScripActions = (
our @ScripConditions = (
{ Name => 'On Acknowledge',
Description => 'When a ticket is changed from an initial status',
- ExecModule => 'OnAcknowledge',
- Argument => '',
+ ExecModule => 'StatusChange',
+ Argument => 'old: initial; new: active',
ApplicableTransTypes => 'Status',
},
);
diff --git a/lib/RT/Condition/OnAcknowledge.pm b/lib/RT/Condition/OnAcknowledge.pm
deleted file mode 100644
index 0e1eb88..0000000
--- a/lib/RT/Condition/OnAcknowledge.pm
+++ /dev/null
@@ -1,19 +0,0 @@
-package RT::Condition::OnAcknowledge;
-
-use strict;
-use warnings;
-use base 'RT::Condition';
-
-sub IsApplicable {
- my $self = shift;
-
- my $txn = $self->TransactionObj;
-
- # only applicable if status was changed from initial status
- return 0
- unless $self->TicketObj->LifecycleObj->IsInitial( $txn->OldValue );
-
- return 1;
-}
-
-1;
commit bfc8ba31c1f03ab10409276900b905a76ffc1373
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Jun 17 11:47:40 2022 -0400
Set subject in pager duty to just the ticket subject
'New ticket' doesn't add much to the incident title, so send
just the ticket subject content.
diff --git a/lib/RT/Action/UpdatePagerDuty.pm b/lib/RT/Action/UpdatePagerDuty.pm
index 1c59524..3fb05e7 100644
--- a/lib/RT/Action/UpdatePagerDuty.pm
+++ b/lib/RT/Action/UpdatePagerDuty.pm
@@ -81,7 +81,7 @@ sub _trigger {
my %post_content = (
incident => {
type => "incident",
- title => "$tag New Ticket $subject",
+ title => "$tag $subject",
service => {
id => $service_id,
type => "service_reference"
-----------------------------------------------------------------------
Summary of changes:
README | 9 ++++++++-
etc/initialdata | 4 ++--
lib/RT/Action/UpdatePagerDuty.pm | 2 +-
lib/RT/Condition/OnAcknowledge.pm | 19 -------------------
lib/RT/Extension/PagerDuty.pm | 10 +++++++++-
5 files changed, 20 insertions(+), 24 deletions(-)
delete mode 100644 lib/RT/Condition/OnAcknowledge.pm
hooks/post-receive
--
rt-extension-pagerduty
More information about the Bps-public-commit
mailing list