[Bps-public-commit] RT-Extension-ActivityReports branch, master, updated. 1.01-10-g226b7f4
Kevin Falcone
falcone at bestpractical.com
Fri Jul 8 18:37:56 EDT 2011
The branch, master has been updated
via 226b7f435e55194e31ee81bdc7938c69b278bd3c (commit)
from 3ff17d9dc53149a6d6fa8435f2d13fea8743656a (commit)
Summary of changes:
html/Reports/Activity/Elements/LimitReport | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 226b7f435e55194e31ee81bdc7938c69b278bd3c
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:37:03 2011 -0400
Fix 'warnings avoidance' that broke remembering the Actor
Back in 9367ccfb12d18348b31f7370a2ca327f997e6007 the Default argument
was removed to avoid warnings. Instead, we'll load the current
Limit to user object and pass that as the default.
diff --git a/html/Reports/Activity/Elements/LimitReport b/html/Reports/Activity/Elements/LimitReport
index 796983b..979f42f 100644
--- a/html/Reports/Activity/Elements/LimitReport
+++ b/html/Reports/Activity/Elements/LimitReport
@@ -13,7 +13,7 @@ Report type: <select name="ReportType">
Start date: <input type="text" name="Start" value="<% $Start %>" /><br />
End date: <input type="text" name="End" value="<% $End %>" /><br />
-Limit to user: <& /Elements/SelectOwner, Name => "Actor", ValueAttribute => 'Name' &>
+Limit to user: <& /Elements/SelectOwner, Name => "Actor", ValueAttribute => 'Name', Default => $actor_obj->Id||0 &>
<& /Elements/Callback, _CallbackName => 'AddOptions', %ARGS &>
<& /Elements/Submit, Label => loc('Report') &>
</form>
@@ -25,4 +25,6 @@ $Query => ''
$Actor => undef
</%args>
<%init>
+my $actor_obj = RT::User->new($session{CurrentUser});
+$actor_obj->LoadByCol( Name => $Actor );
</%init>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list