[Rt-commit] rtir branch, 4.2-theme/migrate-to-elevator-themes, updated. 4.0.1rc1-115-gf540952e

? sunnavy sunnavy at bestpractical.com
Thu Mar 5 17:49:12 EST 2020


The branch, 4.2-theme/migrate-to-elevator-themes has been updated
       via  f540952e1389a9873087e144a1551f08081ceb78 (commit)
       via  50d38ec170fbb87182222a171e44bf1de0559926 (commit)
       via  a5856085ad09eb051aa8db4398b7aa25f8102567 (commit)
      from  fdd0e3a9e09ef277141bde2e8820d40f7952693c (commit)

Summary of changes:
 html/RTIR/Edit.html                    |  2 +-
 html/RTIR/Elements/AttachReports       |  1 +
 html/RTIR/Elements/SelectIncident      |  1 +
 html/RTIR/Elements/ShowIncidents       |  2 ++
 html/RTIR/Incident/BulkAbandon.html    |  1 +
 html/RTIR/Incident/Reply/index.html    |  3 +++
 html/RTIR/Link/FromIncident/index.html |  1 +
 html/RTIR/Link/ToIncident/index.html   |  1 +
 html/RTIR/Report/BulkReject.html       |  1 +
 t/009-attachments-processing.t         | 10 +++++-----
 t/articles/on-create.t                 | 10 ++++------
 t/articles/on-update.t                 | 10 ++++------
 12 files changed, 25 insertions(+), 18 deletions(-)

- Log -----------------------------------------------------------------
commit a5856085ad09eb051aa8db4398b7aa25f8102567
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 6 06:32:31 2020 +0800

    Disable InlineEdit for ticket lists in forms
    
    InlineEdit embeds extra forms into ticket lists. Since nested forms are
    not allowed, we need to disable InlineEdit in that case.

diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index c12a7a9b..a0ab9bbd 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -133,7 +133,7 @@
         <%loc("Incident")%>:
       </div>
       <div class="value col-md-9">
-        <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket &>
+        <& /RTIR/Elements/ShowIncidents, Ticket => $Ticket, InlineEdit => 0 &>
       </div>
     </div>
 % }
diff --git a/html/RTIR/Elements/AttachReports b/html/RTIR/Elements/AttachReports
index d34986d6..2eab83d2 100644
--- a/html/RTIR/Elements/AttachReports
+++ b/html/RTIR/Elements/AttachReports
@@ -52,6 +52,7 @@
     Format         => $Format,
     ShowHeader     => 1,
     ShowNavigation => 0,
+    InlineEdit     => 0,
 &>
 </&>
 <%ARGS>
diff --git a/html/RTIR/Elements/SelectIncident b/html/RTIR/Elements/SelectIncident
index 11b7ea6c..7dac40ec 100644
--- a/html/RTIR/Elements/SelectIncident
+++ b/html/RTIR/Elements/SelectIncident
@@ -59,6 +59,7 @@
            DisplayFormat => $dformat,
            AllowSorting  => 0,
            ShowHeader    => 0,
+           InlineEdit    => 0,
         &>
 % }
 % if ( $hide ) {
diff --git a/html/RTIR/Elements/ShowIncidents b/html/RTIR/Elements/ShowIncidents
index 32147da9..a9c58c59 100644
--- a/html/RTIR/Elements/ShowIncidents
+++ b/html/RTIR/Elements/ShowIncidents
@@ -54,6 +54,7 @@
     AllowSorting  => 0,
     ShowHeader    => 0,
     EmptyLabel    => loc('(none)'),
+    InlineEdit    => $InlineEdit,
 &>
 <div class="actions">
 % unless ( $action ) {
@@ -104,4 +105,5 @@ if ( $show_unlink ) {
 
 <%ARGS>
 $Ticket => undef
+$InlineEdit => RT->Config->Get('InlineEdit', $session{CurrentUser})
 </%ARGS>
diff --git a/html/RTIR/Incident/BulkAbandon.html b/html/RTIR/Incident/BulkAbandon.html
index e3b4e7d1..c41711f4 100644
--- a/html/RTIR/Incident/BulkAbandon.html
+++ b/html/RTIR/Incident/BulkAbandon.html
@@ -71,6 +71,7 @@ BaseURL       => RT::IR->HREFTo('Incident/BulkAbandon.html'),
     EmptyLabel    => loc("no incidents"),
     ShowNavigation  => 1,
     UpdateSession => 1,
+    InlineEdit    => 0,
 );
 </%PERL>
 
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index dcfa8444..ecbf9825 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -80,6 +80,7 @@
     Page          => $Page,
     OrderBy       => $OrderBy,
     Order         => $Order,
+    InlineEdit    => 0,
 &>
 </div>
 % if ( $All ) {
@@ -95,6 +96,7 @@
     Page          => $Page,
     OrderBy       => $OrderBy,
     Order         => $Order,
+    InlineEdit    => 0,
 &>
 </div>
 % unless( RT->Config->Get('RTIR_DisableCountermeasures') ) {
@@ -110,6 +112,7 @@
     Page          => $Page,
     OrderBy       => $OrderBy,
     Order         => $Order,
+    InlineEdit    => 0,
 &>
 </div>
 % }
diff --git a/html/RTIR/Link/FromIncident/index.html b/html/RTIR/Link/FromIncident/index.html
index e246b5e6..223fbd80 100644
--- a/html/RTIR/Link/FromIncident/index.html
+++ b/html/RTIR/Link/FromIncident/index.html
@@ -69,6 +69,7 @@
     Order         => $Order,
     BaseURL       => $base_url,
     ShowNavigation  => 1,
+    InlineEdit    => 0,
 &>
 
 <& /Elements/Submit, Name => "SubmitTicket", Caption => $title, Label => loc("Link") &>
diff --git a/html/RTIR/Link/ToIncident/index.html b/html/RTIR/Link/ToIncident/index.html
index 38dc7e0f..1476cf98 100644
--- a/html/RTIR/Link/ToIncident/index.html
+++ b/html/RTIR/Link/ToIncident/index.html
@@ -73,6 +73,7 @@
     Order         => $Order,
     BaseURL       => RT::IR->HREFTo("Link/ToIncident/?id=$id&Lifecycle=incidents"),
     ShowNavigation  => 1,
+    InlineEdit    => 0,
 &>
 
 <& /Elements/Submit,
diff --git a/html/RTIR/Report/BulkReject.html b/html/RTIR/Report/BulkReject.html
index 89ad8f09..2a2bd608 100644
--- a/html/RTIR/Report/BulkReject.html
+++ b/html/RTIR/Report/BulkReject.html
@@ -73,6 +73,7 @@ my $found = $m->comp( '/RTIR/Search/Elements/ShowResults',
     Order           => $Order,
     ShowNavigation  => 1,
     UpdateSession   => 1,
+    InlineEdit      => 0,
 );
 </%PERL>
 

commit 50d38ec170fbb87182222a171e44bf1de0559926
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 6 06:41:10 2020 +0800

    Update article tests as we don't have "New Article" page menu

diff --git a/t/articles/on-create.t b/t/articles/on-create.t
index f2703e2a..e4defa8b 100644
--- a/t/articles/on-create.t
+++ b/t/articles/on-create.t
@@ -15,13 +15,11 @@ my $article_name = 'some article';
 
 diag "create an article" if $ENV{'TEST_VERBOSE'};
 {
-    $agent->get_ok('/', "followed 'Articles' overview link");
-    $agent->follow_link_ok({text => "Articles"}, "followed 'Articles' overview link");
-    $agent->follow_link_ok({text => "New Article" }, "followed new article link");
+    $agent->follow_link_ok( { text => "Articles", url_regex => qr{/Articles/index\.html} },
+        "followed 'Articles' overview link" );
+    $agent->follow_link_ok( { text => "Templates", url_regex => qr{Article/Edit\.html} },
+        "followed new article link" );
 
-    if ($agent->content =~ /in class Templates/) { 
-        $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
-    }
     my $cf = RT::CustomField->new( RT->SystemUser );
     $cf->Load('Response');
     ok($cf->id, 'found respone custom field');
diff --git a/t/articles/on-update.t b/t/articles/on-update.t
index 6156d4a1..475337d1 100644
--- a/t/articles/on-update.t
+++ b/t/articles/on-update.t
@@ -13,12 +13,10 @@ my $article_name = 'some article';
 
 diag "create an article" if $ENV{'TEST_VERBOSE'};
 {
-    $agent->get_ok('/', "followed 'Articles' overview link");
-    $agent->follow_link_ok({text => "Articles"}, "followed 'Articles' overview link");
-    $agent->follow_link_ok({text => "New Article" }, "followed new article link");
-    if ($agent->content =~ /in class Templates/) { 
-        $agent->follow_link_ok({text => "in class Templates"}, "chose a class");
-    }
+    $agent->follow_link_ok( { text => "Articles", url_regex => qr{/Articles/index\.html} },
+        "followed 'Articles' overview link" );
+    $agent->follow_link_ok( { text => "Templates", url_regex => qr{Article/Edit\.html} },
+        "followed new article link" );
 
     my $cf = RT::CustomField->new( RT->SystemUser );
     $cf->Load('Response');

commit f540952e1389a9873087e144a1551f08081ceb78
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Mar 6 06:45:07 2020 +0800

    Update attachment tests as now we show icons instead of filenames

diff --git a/t/009-attachments-processing.t b/t/009-attachments-processing.t
index 676ce584..c8c6796d 100644
--- a/t/009-attachments-processing.t
+++ b/t/009-attachments-processing.t
@@ -33,7 +33,7 @@ $agent->goto_create_rtir_ticket('Incident Reports');
     my $attachment_link = $agent->find_link(
         tag       => 'a',
         url_regex => qr/\Q$filename/,
-        text      => "Download $filename",
+        text      => '',
     );
     ok($attachment_link, "has link to attachment");
 
@@ -74,7 +74,7 @@ $agent->goto_create_rtir_ticket('Incident Reports');
     my @links = $agent->find_all_links(
         tag        => 'a',
         url_regex  => qr/(?:\Q$fn1\E|\Q$fn2\E)/,
-        text_regex => qr/Download (?:\Q$fn1\E|\Q$fn2\E)/,
+        text       => '',
     );
     is( scalar @links, 2, "has link to two attachments");
     unlink $fn1 or die "couldn't delete file '$fn1': $!";
@@ -109,7 +109,7 @@ SKIP: {
     my $attachment_link = $agent->find_link(
         tag       => 'a',
         url_regex => qr/\Q$filename/,
-        text      => "Download $filename",
+        text      => '',
     );
     ok(!$attachment_link, "no link to attachment");
 
@@ -187,7 +187,7 @@ $agent->goto_create_rtir_ticket('Countermeasures');
     my $attachment_link = $agent->find_link(
         tag       => 'a',
         url_regex => qr/\Q$filename/,
-        text      => "Download $filename",
+        text      => '',
     );
     ok($attachment_link, "has link to attachment");
 
@@ -229,7 +229,7 @@ $agent->goto_create_rtir_ticket('Countermeasures');
         my $attachment_link = $agent->find_link(
             tag       => 'a',
             url_regex => qr/\Q$filename/,
-            text      => "Download $filename",
+            text      => '',
         );
         ok($attachment_link, "has link to attachment");
     }

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


More information about the rt-commit mailing list