[Rt-commit] rt branch, 4.4/dynamic-user-time, repushed

Jim Brandt jbrandt at bestpractical.com
Thu May 25 13:54:27 EDT 2017


The branch 4.4/dynamic-user-time was deleted and repushed:
       was 8b720371a8fa43b7f7d0ad554e70380ed7a3bcad
       now 458f140ab111da5ffc4cacf968a64a2b6058e502

1:  f1d99b3 = 1:  f1d99b3 Calculate time per user dynamically rather than from an attribute
2:  c3ee21e = 2:  c3ee21e Disable user time update scrip on upgrade
3:  a1d633e = 3:  a1d633e Document upgrading details for time worked changes
4:  8b72037 ! 4:  60a9d40 Remove User TimeWorked scrip from install and upgrade
    @@ -1,6 +1,9 @@
     Author: Jim Brandt <jbrandt at bestpractical.com>
     
         Remove User TimeWorked scrip from install and upgrade
    +    
    +    Also remove the scrip action module since it operates on an
    +    attribute that was removed in f1d99b32a8.
     
     diff --git a/etc/initialdata b/etc/initialdata
     --- a/etc/initialdata
    @@ -57,3 +60,105 @@
      );
      
      1;
    +
    +diff --git a/lib/RT/Action/UpdateUserTimeWorked.pm b/lib/RT/Action/UpdateUserTimeWorked.pm
    +deleted file mode 100644
    +--- a/lib/RT/Action/UpdateUserTimeWorked.pm
    ++++ /dev/null
    +@@
    +-# BEGIN BPS TAGGED BLOCK {{{
    +-#
    +-# COPYRIGHT:
    +-#
    +-# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
    +-#                                          <sales at bestpractical.com>
    +-#
    +-# (Except where explicitly superseded by other copyright notices)
    +-#
    +-#
    +-# LICENSE:
    +-#
    +-# This work is made available to you under the terms of Version 2 of
    +-# the GNU General Public License. A copy of that license should have
    +-# been provided with this software, but in any event can be snarfed
    +-# from www.gnu.org.
    +-#
    +-# This work is distributed in the hope that it will be useful, but
    +-# WITHOUT ANY WARRANTY; without even the implied warranty of
    +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    +-# General Public License for more details.
    +-#
    +-# You should have received a copy of the GNU General Public License
    +-# along with this program; if not, write to the Free Software
    +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    +-# 02110-1301 or visit their web page on the internet at
    +-# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
    +-#
    +-#
    +-# CONTRIBUTION SUBMISSION POLICY:
    +-#
    +-# (The following paragraph is not intended to limit the rights granted
    +-# to you to modify and distribute this software under the terms of
    +-# the GNU General Public License and is only of importance to you if
    +-# you choose to contribute your changes and enhancements to the
    +-# community by submitting them to Best Practical Solutions, LLC.)
    +-#
    +-# By intentionally submitting any modifications, corrections or
    +-# derivatives to this work, or any other work intended for use with
    +-# Request Tracker, to Best Practical Solutions, LLC, you confirm that
    +-# you are the copyright holder for those contributions and you grant
    +-# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
    +-# royalty-free, perpetual, license to use, copy, create derivative
    +-# works based on those contributions, and sublicense and distribute
    +-# those contributions and any derivatives thereof.
    +-#
    +-# END BPS TAGGED BLOCK }}}
    +-
    +-use strict;
    +-use warnings;
    +-
    +-package RT::Action::UpdateUserTimeWorked;
    +-use base 'RT::Action';
    +-
    +-=head1 NAME
    +-
    +-RT::Action::UpdateUserTimeWorked - RT's scrip action to set/update the time
    +-worked for a user each time they log time worked on a ticket
    +-
    +-=head1 DESCRIPTION
    +-
    +-This action is used as an action for the 'On TimeWorked Change' condition.
    +-
    +-When it fires, a ticket attribute stores the amount of time the user updating
    +-the ticket worked on it.
    +-
    +-=cut
    +-
    +-sub Prepare {
    +-    return 1;
    +-}
    +-
    +-sub Commit {
    +-    my $self   = shift;
    +-    my $ticket = $self->TicketObj;
    +-    my $txn    = $self->TransactionObj;
    +-
    +-    my $time_worked_attr = $ticket->FirstAttribute('TimeWorked');
    +-    # if the attribute is not defined, we will initialize it in the callback,
    +-    # so no need to handle it here
    +-    if ( $time_worked_attr ) {
    +-        my $time_worked = $time_worked_attr->Content;
    +-        $time_worked->{ $txn->CreatorObj->Name } += $txn->TimeTaken
    +-          || $txn->NewValue - $txn->OldValue;
    +-        $time_worked_attr->SetContent( $time_worked );
    +-    }
    +-}
    +-
    +-=head1 AUTHOR
    +-
    +-Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>
    +-
    +-=cut
    +-
    +-1;
    +
-:  ------- > 5:  4e690a6 Note details on operation of parent time worked action
-:  ------- > 6:  458f140 Remove ParentTimeWorked from upgrades and new installs



More information about the rt-commit mailing list