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

BPS Git Server git at git.bestpractical.com
Thu Jul 6 17:23:28 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  99e84312ce46ce2f804461ea1a5fc3a13de07ad0 (commit)

- Log -----------------------------------------------------------------
commit 99e84312ce46ce2f804461ea1a5fc3a13de07ad0
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date:   Fri Mar 10 13:37:57 2023 -0300

    Update POD with know issue about inactivated tickets
    
    This is a known issue with the current implementation of the plugin. The
    plugin will may not show inactivated tickets in the "My Week" view if the
    ticket is moved to a queue with different Lifecycle after its status was
    changed to a "inactivated" status type.

diff --git a/README b/README
index 4dae56a..21cc375 100644
--- a/README
+++ b/README
@@ -147,6 +147,15 @@ METHODS
     not yet because of DST, this method adjusts it accordingly. Note that
     the adjustment is inplace.
 
+  KNOWN ISSUES
+    My Week page automaticaly shows tickets where the user has tracked time
+    during the current week, as well as tickets that were created or where
+    the user has replied or commented during the current week.
+    Additionally, it shows tickets resolved by the user during the current
+    week, based on the Lifecycle where the ticket currently resides.
+    If ticket is moved after it was resolved to a queue with a different
+    Lifecycle, it may not be shown on the My Week page.
+
 AUTHOR
     Best Practical Solutions, LLC <modules at bestpractical.com>
 

commit cf5730aecd210d33e8393fabf9a9898f3243f105
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
    
    Tickets that got resolved without comments or replies were
    not included on the My Week page. Now it's easier to check
    and add time to those Tickets.

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