[Rt-commit] rtir branch 5.0/create-templates-class-first created. 5.0.3-26-g941f7e66
BPS Git Server
git at git.bestpractical.com
Fri Apr 21 13:26:47 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/create-templates-class-first has been created
at 941f7e664144f9e314ba6569f5a64667fb68f4aa (commit)
- Log -----------------------------------------------------------------
commit 941f7e664144f9e314ba6569f5a64667fb68f4aa
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Apr 21 21:11:27 2023 +0800
Move "Templates" class creation from @Final to @Classes
This is mainly to retain the ordering so "Templates" is created before
the new added "Incidents Processes".
diff --git a/etc/initialdata b/etc/initialdata
index 9af4f384..132cbaac 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -675,6 +675,11 @@ for my $cf (@CustomFields) {
}
@Classes = (
+ {
+ Name => 'Templates',
+ Description => 'Response templates',
+ ApplyTo => [ map { $_->{Name} } @Queues ],
+ },
{
Name => 'Incidents Processes',
Description => 'Processes to be followed in the event of an incident',
@@ -759,25 +764,6 @@ for my $cf (@CustomFields) {
require RT::Class;
my $class = RT::Class->new($CurrentUser);
$class->Load('Templates');
- unless ( $class->Id ) {
- $RT::Logger->info("Creating 'Templates' Article class.");
- my ( $id, $msg ) = $class->Create(
- Name => 'Templates',
- Description => 'Response templates',
- HotList => 1
- );
- die $msg unless $id;
-
- foreach my $qname ( map $_->{'Name'}, @Queues ) {
- my $queue = RT::Queue->new($CurrentUser);
- $queue->Load($qname);
- next unless $queue->id;
-
- my ( $status, $msg ) = $class->AddToObject($queue);
- $RT::Logger->error("Couldn't apply class to queue '$qname'")
- unless $status;
- }
- }
require RT::Article;
my $response = RT::CustomField->new($CurrentUser);
-----------------------------------------------------------------------
hooks/post-receive
--
rtir
More information about the rt-commit
mailing list