Asign cases even with sample disabled and sample unassigned from questionnaire

Bug #1411703 reported by Alex
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
queXS
Fix Released
High
Adam Zammit

Bug Description

Wanted to finish previous samples for questionnaire , so unassigned samples from questionnaire , disables samples and found that
If there're cases with "temporary" outcomes for that samples:

1. cases from unassigned and disabled samples still displayed on "Case status and assignment" page (Superviser functions menu)
2. possible to assign them to operators
3. if sample is disabled but nut unassigned from questionnaire , it is still selectable in "select sample"

Doubt it's usefull to have a list of cases from disabled unassigned samples, and may lead to supervisers mistakes...

Found that in /admin/casestatus.php sql querry there's no check if this sample is enabled and no check if this sample is still assigned to quistionnaire.

Here's the patch for the first 2 issues: file {quexs directory}/admin/casestatus.php

row 99 : JOIN sample_import as si ON (s.import_id = si.sample_import_id )
change to : JOIN sample_import as si ON (s.import_id = si.sample_import_id AND si.enabled = 1)

add row 100 : JOIN questionnaire_sample as qs ON (qs.questionnaire_id = q.questionnaire_id AND qs.sample_import_id = s.import_id)

Didn't succeed with "select sample" issue Nr3 ... and don't want to alter xml select function... Sample still selectable untill unassigned.

Adam, could you please add to sample selector additional filter if sample is enabled ...

Best regards,
Alex

Related branches

Adam Zammit (adamzammit)
Changed in quexs:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Adam Zammit (adamzammit)
milestone: none → 1.11.1
Adam Zammit (adamzammit)
Changed in quexs:
status: Confirmed → Fix Committed
Adam Zammit (adamzammit)
Changed in quexs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.