Permalink
Browse files

Fix 'warnings avoidance' that broke remembering the Actor

Back in 9367ccf the Default argument
was removed to avoid warnings.  Instead, we'll load the current
Limit to user object and pass that as the default.
  • Loading branch information...
1 parent 3ff17d9 commit 226b7f435e55194e31ee81bdc7938c69b278bd3c @jibsheet jibsheet committed Jul 8, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 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>

0 comments on commit 226b7f4

Please sign in to comment.