liquid_feedback_frontend
diff model/issue.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
author | bsw/jbe |
---|---|
date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
parents | 8288027edb54 |
children | faaf9ec3e09c |
line diff
1.1 --- a/model/issue.lua Thu Jun 23 03:30:57 2016 +0200 1.2 +++ b/model/issue.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -162,7 +162,7 @@ 1.4 selector:add_field ( "non_voter.member_id NOTNULL", "non_voter" ) 1.5 selector:left_join ( "direct_interest_snapshot", nil, { [[ 1.6 direct_interest_snapshot.issue_id = issue.id AND 1.7 - direct_interest_snapshot.event = issue.latest_snapshot_event AND 1.8 + direct_interest_snapshot.snapshot_id = issue.latest_snapshot_id AND 1.9 direct_interest_snapshot.member_id = ? 1.10 ]], options.member_id }) 1.11 selector:add_field ( "direct_interest_snapshot.weight", "weight" ) 1.12 @@ -275,3 +275,10 @@ 1.13 return _("ends in #{state_time_left}", { state_time_left = self.state_time_left }) 1.14 end 1.15 end 1.16 + 1.17 +function Issue:by_ids(ids) 1.18 + local selector = self:new_selector() 1.19 + selector:add_where{'"id" IN ($)', { ids } } 1.20 + return selector:exec() 1.21 +end 1.22 +