[Bps-public-commit] rt-extension-historyonchange branch, master, updated. c09803ea305cfc24e574c34f88c0ca3b7b570b6d

? sunnavy sunnavy at bestpractical.com
Tue Sep 24 06:57:56 EDT 2013


The branch, master has been updated
       via  c09803ea305cfc24e574c34f88c0ca3b7b570b6d (commit)
       via  4bd517db1f79a3b49934455a295929433c2d5a68 (commit)
      from  a5a0bd4c3c3821da53347bf88a856abb77057c45 (commit)

Summary of changes:
 etc/history_on_change.diff                                   | 12 ------------
 .../HistoryOnChange/Elements/ShowHistory/SkipTransaction     |  2 +-
 html/Callbacks/HistoryOnChange/Ticket/Modify.html/AfterForm  |  1 -
 3 files changed, 1 insertion(+), 14 deletions(-)

- Log -----------------------------------------------------------------
commit 4bd517db1f79a3b49934455a295929433c2d5a68
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Sep 24 18:56:17 2013 +0800

    no need to hide actions

diff --git a/html/Callbacks/HistoryOnChange/Ticket/Modify.html/AfterForm b/html/Callbacks/HistoryOnChange/Ticket/Modify.html/AfterForm
index b8c7bb3..aaa70de 100644
--- a/html/Callbacks/HistoryOnChange/Ticket/Modify.html/AfterForm
+++ b/html/Callbacks/HistoryOnChange/Ticket/Modify.html/AfterForm
@@ -1,7 +1,6 @@
 <& /Ticket/Elements/DelayShowHistory,
     %$ARGSRef,
     Ticket => $Ticket,
-    ShowActions => 0,
     HistoryOnChange => 1,
 &>
 

commit c09803ea305cfc24e574c34f88c0ca3b7b570b6d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Sep 24 18:56:38 2013 +0800

    no need to send all the arguments to /Elements/ShowHistory
    
    it's not safe either. we can simply check $DECODED_ARGS instead

diff --git a/etc/history_on_change.diff b/etc/history_on_change.diff
index 920f6cb..36561dd 100644
--- a/etc/history_on_change.diff
+++ b/etc/history_on_change.diff
@@ -1,15 +1,3 @@
-diff --git a/share/html/Helpers/TicketHistory b/share/html/Helpers/TicketHistory
-index d47a4ca..709dd48 100644
---- a/share/html/Helpers/TicketHistory
-+++ b/share/html/Helpers/TicketHistory
-@@ -56,6 +56,7 @@ my $attachments = $TicketObj->Attachments;
- my $attachment_content = $TicketObj->TextAttachments;
- </%INIT>
- <& /Elements/ShowHistory,
-+    %ARGS,
-     Object => $TicketObj,
-     ShowHeaders => $ARGS{'ShowHeaders'},
-     Attachments => $attachments,
 diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
 index e9ef761..8c7e3c1 100644
 --- a/share/html/Ticket/Modify.html
diff --git a/html/Callbacks/HistoryOnChange/Elements/ShowHistory/SkipTransaction b/html/Callbacks/HistoryOnChange/Elements/ShowHistory/SkipTransaction
index db67685..ad8ab67 100644
--- a/html/Callbacks/HistoryOnChange/Elements/ShowHistory/SkipTransaction
+++ b/html/Callbacks/HistoryOnChange/Elements/ShowHistory/SkipTransaction
@@ -1,5 +1,6 @@
 <%INIT>
 
+return unless $DECODED_ARGS->{HistoryOnChange};
 my %allowed_type = map { $_ => 1 } grep { defined } RT->Config->Get('HistoryOnChangeTransactionTypes');
 if ( scalar %allowed_type ) {
     $$skip = 1 unless $allowed_type{$Transaction->Type};
@@ -8,7 +9,6 @@ if ( scalar %allowed_type ) {
 </%INIT>
 
 <%ARGS>
-$HistoryOnChange => undef
 $Transaction
 $skip
 </%ARGS>

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



More information about the Bps-public-commit mailing list