[Bps-public-commit] rt-extension-timetracking branch add-inactivated-tickets-to-my-week created. 0.23-1-g6251183

BPS Git Server git at git.bestpractical.com
Thu Mar 9 20:45:27 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 "rt-extension-timetracking".

The branch, add-inactivated-tickets-to-my-week has been created
        at  625118350293e2d52e5a8296f3665a5e745aa85a (commit)

- Log -----------------------------------------------------------------
commit 625118350293e2d52e5a8296f3665a5e745aa85a
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Thu Mar 9 17:43:11 2023 -0300

    Add tickets that were inactivated to the My Week page
    
    Add tickets that were inactivated during the week to the My Week page.
    Note that currently we check active status with current ticket queue,
    not the one it was in when the transaction was created.

diff --git a/html/Tools/MyWeek.html b/html/Tools/MyWeek.html
index df2101d..66dd86e 100644
--- a/html/Tools/MyWeek.html
+++ b/html/Tools/MyWeek.html
@@ -365,11 +365,15 @@ $activity_txns->Limit( FIELD => 'Created', OPERATOR => '<',  VALUE => $week_end-
 $activity_txns->Limit( FIELD => 'Type', VALUE => 'Create' );
 $activity_txns->Limit( FIELD => 'Type', VALUE => 'Correspond' );
 $activity_txns->Limit( FIELD => 'Type', VALUE => 'Comment' );
+$activity_txns->Limit( FIELD => 'Type', VALUE => 'Status' );
 my @ticket_ids;
 while ( my $txn = $activity_txns->Next ) {
     my $ticket = $txn->Object;
     my $worked_date = $txn->CreatedObj->ISO( Time => 0, Timezone => 'user' );
     next unless $week_worked{$worked_date};
+    # Currently we check active status with current ticket queue, not the one
+    # it was in when the transaction was created
+    next if $txn->Type eq 'Status' && $ticket->QueueObj->IsActiveStatus( $txn->NewValue );
     next if $week_worked{$worked_date}{tickets}{$ticket->id};
     $week_worked{$worked_date}{tickets}{$ticket->id} = {
         ticket => $ticket,

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


hooks/post-receive
-- 
rt-extension-timetracking


More information about the Bps-public-commit mailing list