Patch #239
open
Adds two blocks for my/page and fixes a report bug
Added by Rocco Stanzione almost 17 years ago.
Updated over 2 years ago.
Description
This fixes a report query filter bug where assigned_to="me", and adds two new blocks for my/page, for a manager's
dashboard - issues due in the next week and past due issues.
Files
This fixes a report query filter bug where
assigned_to="me"
Could you tell more about this bug ?
Maybe I should have better documented the bug before
submitting the fix. If I set a filter like
assigned_to="me", it often (but not always) wouldn't
work
because executed_by was nil, apparently because
User.current.logged? was returning false. This patch makes
it work by assuming that if User.current is not nil,
User.current is logged in and should be treated as
"me".
If I set a filter like assigned_to="me", it often
(but not always) wouldn't work
What do you when ? You get an error or the filter is not taken
into accout ?
by assuming that if User.current is not nil
In fact, User.current is never nil.
What do you when ? You get an error or the filter is not
takeninto accout ?
The filter is incorrect (if I remember right, the SQL says
assigned_to='') and no results are returned.
In fact, User.current is never nil.
That's the idea. Possibly I'm missing something, but
User.current.logged? looked like an unnecessary step that
was returning the wrong results, so I circumvented
executed_by with User.current.
I think I found the bug.
But I applied a different fix (in r979) because I don't want
that the "me" value appears when the user is not logged
(since the app don't know who he is).
Also available in: Atom
PDF