[Bps-public-commit] RT-BugTracker-Public branch, 4.2-4.4-compatibility, updated. 1.00-19-ga2d4f33

Jim Brandt jbrandt at bestpractical.com
Wed Mar 29 16:55:48 EDT 2017


The branch, 4.2-4.4-compatibility has been updated
       via  a2d4f33dc9401186251fc4247d2fc8efd55add8e (commit)
      from  5e645bfb6302d26d1b090cd436b1164d8e5110b9 (commit)

Summary of changes:
 etc/initialdata | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 etc/initialdata

- Log -----------------------------------------------------------------
commit a2d4f33dc9401186251fc4247d2fc8efd55add8e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Wed Mar 29 16:40:53 2017 -0400

    Add initialdata for default content articles

diff --git a/etc/initialdata b/etc/initialdata
new file mode 100644
index 0000000..4c4baac
--- /dev/null
+++ b/etc/initialdata
@@ -0,0 +1,25 @@
+ at Classes = (
+    {
+        Name              => 'BugTracker Pages',
+        Description       => 'Class to hold articles for customizing BugTracker extension pages',
+    },
+);
+
+our @Final = (
+    sub {
+        my %articles = (
+        'AfterLoginForm' => q{<h3>Don't have an account but want to browse bugs?</h3>
+<p>Use the <a href="/Public/">public interface</a></p>
+<p>Want to report a bug? Send it in via e-mail.</p>},
+        );
+
+        foreach my $article_name ( keys %articles ){
+            my $article = RT::Article->new(RT->SystemUser);
+            my ($ret, $msg) = $article->Create(
+                'Name' => $article_name,
+                'Class' => 'BugTracker Pages',
+                'CustomField-Content' => $articles{$article_name} );
+            RT::Logger->error("Unable to create new article $article_name: $msg") unless $ret;
+        }
+    },
+);

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list