File tree 1 file changed +3
-2
lines changed
app/org/maproulette/framework/repository
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -173,11 +173,12 @@ class ChallengeRepository @Inject() (override val db: Database) extends Reposito
173
173
SQL (
174
174
s """
175
175
|UPDATE challenges
176
- |SET completion_percentage = new_completion_percentage
176
+ |SET completion_percentage = new_completion_percentage, tasks_remaining = new_tasks_remaining
177
177
|FROM (
178
178
| SELECT
179
179
| challenges.id AS challenge_id,
180
- | completed_task_counts.completed_tasks * 100 / total_task_counts.total_tasks AS new_completion_percentage
180
+ | completed_task_counts.completed_tasks * 100 / total_task_counts.total_tasks AS new_completion_percentage,
181
+ | total_task_counts.total_tasks - completed_task_counts.completed_tasks AS new_tasks_remaining
181
182
| FROM
182
183
| challenges
183
184
| JOIN (
You can’t perform that action at this time.
0 commit comments