[Bps-public-commit] rt-extension-inlinehelp branch target-selector updated. 041b2119bc16acdf862d1b05ebf10e796384edd4
BPS Git Server
git at git.bestpractical.com
Tue Oct 26 14:00:51 UTC 2021
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-inlinehelp".
The branch, target-selector has been updated
via 041b2119bc16acdf862d1b05ebf10e796384edd4 (commit)
from c30156a55b4dc20986cb709165a13faa79006a8b (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 041b2119bc16acdf862d1b05ebf10e796384edd4
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Oct 26 21:56:34 2021 +0800
Make sure "Content" custom field is applied to "Inline Help" class
By default Content is applied globally, but admins can change that.
This commit is to make sure "Inline Help" class has "Content" applied.
diff --git a/etc/initialdata b/etc/initialdata
index c1d1fea..7b38229 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -69,4 +69,22 @@ our @OCFVs = (
},
);
+our @Final = (
+ sub {
+ my $cf = RT::CustomField->new( RT->SystemUser );
+ $cf->LoadByName( Name => 'Content', LookupType => RT::Article->CustomFieldLookupType );
+ die 'Failed to load Content customfield' unless $cf->Id;
+
+ return if $cf->IsGlobal;
+
+ my $help_class = RT::Class->new( RT->SystemUser );
+ $help_class->Load('Inline Help');
+
+ if ( !$cf->IsAdded( $help_class->Id ) ) {
+ my ( $ret, $msg ) = $cf->AddToObject($help_class);
+ die $msg unless $ret;
+ }
+ },
+);
+
1;
-----------------------------------------------------------------------
Summary of changes:
etc/initialdata | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
hooks/post-receive
--
rt-extension-inlinehelp
More information about the Bps-public-commit
mailing list