[Bps-public-commit] rt-extension-helpdesk branch, master, updated. ff85315f269f598deb5d58805f2a6803e1a8eecc
Craig Kaiser
craig at bestpractical.com
Mon Mar 29 12:20:20 EDT 2021
The branch, master has been updated
via ff85315f269f598deb5d58805f2a6803e1a8eecc (commit)
via 3776fa0f42f30dc225b015e008ba4fe0d7469993 (commit)
from ce8efb3f327dfc0f36d704516c296db96b006e0b (commit)
Summary of changes:
etc/Helpdesk_Config.pm | 5 +++
etc/initialdata | 113 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 118 insertions(+)
create mode 100644 etc/Helpdesk_Config.pm
- Log -----------------------------------------------------------------
commit 3776fa0f42f30dc225b015e008ba4fe0d7469993
Author: craig kaiser <craig at bestpractical.com>
Date: Mon Mar 29 12:17:32 2021 -0400
Add example helpdesk custom fields
diff --git a/etc/Helpdesk_Config.pm b/etc/Helpdesk_Config.pm
new file mode 100644
index 0000000..72880d1
--- /dev/null
+++ b/etc/Helpdesk_Config.pm
@@ -0,0 +1,5 @@
+Set(%CustomFieldGroupings,
+ 'RT::Ticket' => [
+ 'Helpdesp Information' => ['Severity', 'Service Impacted'],
+ ],
+);
diff --git a/etc/initialdata b/etc/initialdata
index e385784..3e4738a 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -48,6 +48,36 @@ push @ACL, map {
}
} @SupportRepresentativeRights;
+our @CustomFields = (
+ {
+ Name => 'Severity',
+ Type => 'SelectSingle',
+ LookupType => 'RT::Queue-RT::Ticket',
+ Description => 'Severity of finding',
+ ApplyTo => 'Support',
+ RenderType => 'Dropdown',
+ Values => [
+ { Name => 'Low', SortOrder => 1 },
+ { Name => 'Medium', SortOrder => 2 },
+ { Name => 'High', SortOrder => 3 },
+ ],
+ },
+ {
+ Name => 'Service Impacted',
+ Type => 'AutocompleteSingle',
+ LookupType => 'RT::Queue-RT::Ticket',
+ Description => 'Which service is impacted by this ticket',
+ ApplyTo => 'Support',
+ Values => [
+ { Name => 'Email', SortOrder => 1 },
+ { Name => 'Website', SortOrder => 2 },
+ { Name => 'Auth Services', SortOrder => 3 },
+ { Name => 'Document Sharing', SortOrder => 4 },
+ { Name => 'Chat', SortOrder => 5 },
+ ],
+ },
+);
+
our @ScripActions = (
{
Name => 'Set Status - waiting for customer',
commit ff85315f269f598deb5d58805f2a6803e1a8eecc
Author: craig kaiser <craig at bestpractical.com>
Date: Mon Mar 29 12:18:06 2021 -0400
Add support dashboard and saved search
diff --git a/etc/initialdata b/etc/initialdata
index 3e4738a..4c1cca9 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -126,3 +126,86 @@ our @Scrips = (
Stage => 'TransactionCreate',
},
);
+
+
+our @Attributes = (
+ {
+ Name => 'SavedSearch',
+ Description => 'Highest severity tickets waiting on support',
+ Object => sub {
+ my $GroupName = 'Support';
+ my $group = RT::Group->new( RT->SystemUser );
+
+ my( $ret, $msg ) = $group->LoadUserDefinedGroup( $GroupName );
+ die $msg unless $ret;
+
+ return $group;
+ },
+ Content => {
+ Format => qq[''<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
+'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
+Status,
+Owner,
+Priority,
+'__NEWLINE__',
+'<small>__Requestors__</small>',
+'<small>__CreatedRelative__</small>',
+'__CustomFieldView.{Severity}__',
+'__CustomField.{Service Impacted}__'],
+ Query => "Queue = 'Support' AND ( Status = 'waiting for support' OR Status = 'open' OR Status = 'new' )",
+ OrderBy => 'Priority',
+ Order => 'DESC'
+ },
+ },
+);
+
+our @Final = (sub {
+ my $GroupName = 'Support';
+ my $group = RT::Group->new( RT->SystemUser );
+
+ my ( $ret, $msg ) = $group->LoadUserDefinedGroup( $GroupName );
+ die $msg unless $ret;
+
+ my $root = RT::User->new( RT->SystemUser );
+ $root->Load( 'root' );
+
+ ($ret, $msg) = $group->AddMember( $root->PrincipalObj->Id );
+ print "Could not load root user: $msg\n" unless $ret;
+
+ foreach my $right ( qw/SeeGroupDashboard ShowSavedSearches EditSavedSearches ModifyGroupDashboard/ ) {
+ ($ret, $msg) = $group->PrincipalObj->GrantRight( Right => $right, Object => $group );
+ print "Failed to grant right $right: $msg\n" unless $ret;
+ }
+
+ # Create our new dashboard
+ my $dashboard = RT::Dashboard->new( RT->SystemUser );
+ ($ret, $msg) = $dashboard->Save(
+ Name => 'Support',
+ Privacy => 'RT::Group-'.$group->Id,
+ );
+ die "Could not create dashboard! $msg\n" unless $ret;
+
+ my $saved_search = RT::Attribute->new( RT->SystemUser );
+ ($ret, $msg) = $saved_search->LoadByCols(
+ Name => 'SavedSearch',
+ Description => 'Highest severity tickets waiting on support',
+ ObjectType => 'RT::Group',
+ ObjectId => $group->Id,
+ );
+ die "Could not load highest severity saved search: $msg" unless $ret;
+
+ ($ret, $msg) = $dashboard->Update( Panes => {
+ body => [
+ {
+ description => "Saved Search: Highest severity tickets waiting on support",
+ id => $saved_search->Id,
+ pane => "body",
+ portlet_type => "search",
+ privacy => "RT::Group-".$group->Id
+ }
+ ],
+ sidebar => [
+ ]
+ });
+ die "$msg" unless $ret;
+});
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list