[Rt-commit] rt branch, 4.4/user-time-worked, repushed
Craig Kaiser
craig at bestpractical.com
Mon Jun 14 15:10:04 EDT 2021
The branch 4.4/user-time-worked was deleted and repushed:
was f1b838d3ef29cc83df2afd2b41594ad467fbd27e
now b16a2928394574b4eb3835127cd6deab88ad9a03
-: ------- > 1: 76b00a5510 Pass term and args to ModifyUsersLimit so it can behave differently based on it
-: ------- > 2: d2347bbbb9 Add ModifyGroupsLimit callback for Groups autocomplete
-: ------- > 3: 8419c6807c Sync callbacks of Users/Groups autcomplete to Principals
1: 783700b0e3 ! 4: f26efe387a Create a standard RT Time Worked report
@@ -83,44 +83,44 @@
+ </td>
+ <td align="right">
+ <input style="width: 17em" class="user-time-worked-input" name="user_req"
-+ data-autocomplete="Users"
-+ data-autocomplete-return="Name"
-+ placeholder="<% loc("Find a user...") %>" Value = <% $user_req %>
++ data-autocomplete="Users"
++ data-autocomplete-return="Name"
++ placeholder="<% loc("Find a user...") %>" Value = <% $user_req %>
+ >
+ </td>
+ </tr>
+ <tr>
+ <td align="right">
-+ <label>Start Date:</label>
-+ </td>
-+ <td align="right">
-+ <& /Elements/SelectDate, ShowTime => 0, Name => 'startdate', Default => $startdate &>
-+ </td>
-+ </tr>
-+ <tr>
-+ <td align="right">
-+ <label>End Date:</label>
++ <label><&|/l&>Start Date</&>:</label>
++ </td>
++ <td align="right">
++ <& /Elements/SelectDate, ShowTime => 1, Name => 'startdate', Default => $startdate &>
++ </td>
++ </tr>
++ <tr>
++ <td align="right">
++ <label><&|/l&>End Date</&>:</label>
+ </td>
+ <td align="">
-+ <& /Elements/SelectDate, ShowTime => 0, Name => 'enddate', Default => $enddate &>
-+ </td>
-+ </tr>
-+ <tr>
-+ <td align="right">
-+ <label>Sort By:</label>
++ <& /Elements/SelectDate, ShowTime => 1, Name => 'enddate', Default => $enddate &>
++ </td>
++ </tr>
++ <tr>
++ <td align="right">
++ <label><&|/l&>Sort By</&>:</label>
+ </td>
+ <td>
+ <select name="SortBy">
-+ <option value="Date" <% $SortBy eq 'Date' ? 'checked="checked"' : '' |n%> value="DateWorked"><&|/l&>Date time worked</&></option>
-+ <option value="User" <% $SortBy eq 'User' ? 'checked="checked"' : '' |n%> value="ByUser"><&|/l&>By User</&></option>
-+ <option value="Ticket" <% $SortBy eq 'Ticket' ? 'checked="checked"' : '' |n%> value="ByTicket"><&|/l&>By Ticket</&></option>
-+ <option value="Queue" <% $SortBy eq 'Queue' ? 'checked="checked"' : '' |n%> value="ByQueue"><&|/l&>By Queue</&></option>
++ <option value="Date" <% $SortBy eq 'Date' ? 'selected="selected"' : '' |n%>><&|/l&>Date time worked</&></option>
++ <option value="User" <% $SortBy eq 'User' ? 'selected="selected"' : '' |n%>><&|/l&>By User</&></option>
++ <option value="Ticket" <% $SortBy eq 'Ticket' ? 'selected="selected"' : '' |n%>><&|/l&>By Ticket</&></option>
++ <option value="Queue" <% $SortBy eq 'Queue' ? 'selected="selected"' : '' |n%>><&|/l&>By Queue</&></option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td align="right">
-+ <label>Queue:</label>
++ <label><&|/l&>Queue</&>:</label>
+ </td>
+ <td>
+ <& /Elements/SelectQueue, Name => 'queue', Id => 'queue', Default => $queue &>
@@ -139,41 +139,44 @@
+% foreach my $delimeter (sort keys %$data) {
+ <h3><% $delimeter %></h3>
+ <table class="ticket-list collection-as-table">
-+ <tr class="collection-as-table">
-+ <th class="collection-as-table">Id</th>
-+ <th class="collection-as-table">Subject</th>
-+ <th class="collection-as-table">Queue</th>
-+ <th class="collection-as-table">Status</th>
-+ <th class="collection-as-table">Owner</th>
-+ <th class="collection-as-table">Time Worked</th>
-+ <th class="collection-as-table">Worked By</th>
-+ </tr>
++ <tr class="collection-as-table">
++ <th class="collection-as-table"><&|/l&>Id</&></th>
++ <th class="collection-as-table"><&|/l&>Subject</&></th>
++ <th class="collection-as-table"><&|/l&>Queue</&></th>
++ <th class="collection-as-table"><&|/l&>Status</&></th>
++ <th class="collection-as-table"><&|/l&>Owner</&></th>
++ <th class="collection-as-table"><&|/l&>Time Worked</&></th>
++ <th class="collection-as-table"><&|/l&>Worked By</&></th>
++ </tr>
+% my $line_type = "oddline";
+% my ($total_time_mins, $total_time_hours);
+% foreach my $time (@{$data->{$delimeter} }) {
-+ <tr class="<% $line_type %>">
-+ <td class="collection-as-table">
-+ <a href="<% RT->Config->Get('WebPath')."/Ticket/Display.html?id=$time->{Id}" %>"><% $time->{Id} %></a>
-+ </td>
-+ <td class="collection-as-table"><% $time->{Subject} %></td>
-+ <td class="collection-as-table"><% $time->{Queue} %></td>
-+ <td class="collection-as-table"><% $time->{Status} %></td>
-+ <td class="collection-as-table">
-+ <a href="<% RT->Config->Get('WebPath')."Admin/Users/Modify.html?id=$time->{OwnerId}" %>"><% $time->{Owner} %></a>
-+ </td>
-+ <td class="collection-as-table"><% $time->{Time} %></td>
-+ <td class="collection-as-table">
-+ <a href="<% RT->Config->Get('WebPath')."Admin/Users/Modify.html?id=$time->{WorkerId}" %>"><% $time->{Worker} %></a>
-+ </td>
-+ </tr>
++ <tr class="<% $line_type %>">
++ <td class="collection-as-table">
++ <a href="<% RT->Config->Get('WebBaseURL')."/Ticket/Display.html?id=$time->{Id}" %>"><% $time->{Id} %></a>
++ </td>
++ <td class="collection-as-table"><% $time->{Subject} %></td>
++ <td class="collection-as-table"><% $time->{Queue} %></td>
++ <td class="collection-as-table"><% $time->{Status} %></td>
++ <td class="collection-as-table">
++ <a href="<% RT->Config->Get('WebBaseURL')."/User/Summary.html?id=$time->{OwnerId}" %>"><% $time->{Owner} %></a>
++ </td>
++ <td class="collection-as-table"><% $time->{Time} %></td>
++ <td class="collection-as-table">
++ <a href="<% RT->Config->Get('WebBaseURL')."/User/Summary.html?id=$time->{WorkerId}" %>"><% $time->{Worker} %></a>
++ </td>
++ </tr>
+% $line_type = $line_type eq "oddline" ? "evenline" : "oddline";
+% $total_time_mins += $time->{TimeMin};
+% $total_time_hours += $time->{TimeHours};
+% }
+ </table>
-+ <label>Total: <% $total_time_hours %> hours (<% $total_time_mins %> minutes)</label>
++ <label>Total: <% $total_time_hours %> <&|/l&>hours</&> (<% $total_time_mins %> <&|/l&>minutes</&>)</label>
+% }
+</div>
++% }
++% else {
++ <&|/l&>No tickets found</&>
+% }
+
+<%INIT>
@@ -218,7 +221,7 @@
+ }
+ $txns->Limit( FIELD => 'TimeTaken', VALUE => 0, OPERATOR => '!=' );
+ $txns->Limit( FIELD => 'Created', VALUE => $start_date->ISO(Timezone => 'user'), OPERATOR => '>=' );
-+ $txns->Limit( FIELD => 'Created', VALUE => $end_date->ISO(Timezone => 'user'), OPERATOR => '<=', ENTRYAGGREGATOR => 'AND');
++ $txns->Limit( FIELD => 'Created', VALUE => $end_date->ISO(Timezone => 'user'), OPERATOR => '<', ENTRYAGGREGATOR => 'AND');
+
+ my $total_time_worked = 0;
+
@@ -261,7 +264,7 @@
+$startdate => ''
+$enddate => ''
+$user_req => undef
-+$SortBy => 'date'
++$SortBy => 'Date'
+$data => undef
+$queue => undef
+</%ARGS>
2: f1b838d3ef = 5: b16a292839 Add docs for User Time Worked Report
More information about the rt-commit
mailing list