mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-17 04:38:08 +01:00
fix #997. The chart with the visible actions now excludes pending actions. Also some cleanupt to use named_scope
This commit is contained in:
parent
06ac3067d3
commit
9d5503a91e
3 changed files with 17 additions and 11 deletions
|
|
@ -319,6 +319,7 @@ class StatsController < ApplicationController
|
|||
# - actions not part of a hidden project
|
||||
# - actions not part of a hidden context
|
||||
# - actions not deferred (show_from must be null)
|
||||
# - actions not pending/blocked
|
||||
|
||||
@actions_running_time = @actions.find_by_sql([
|
||||
"SELECT t.created_at "+
|
||||
|
|
@ -326,7 +327,7 @@ class StatsController < ApplicationController
|
|||
"WHERE t.user_id=? "+
|
||||
"AND t.completed_at IS NULL " +
|
||||
"AND t.show_from IS NULL " +
|
||||
"AND NOT (p.state='hidden' OR c.hide=?) " +
|
||||
"AND NOT (p.state='hidden' OR p.state='pending' OR c.hide=?) " +
|
||||
"ORDER BY t.created_at ASC", @user.id, true]
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue