add SGQ code to questions selector, proper questions list order

Bug #1472581 reported by Alex
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
queXS
Fix Released
Low
Unassigned

Bug Description

common for quota.php and quotarow.php :
1. tables with quotas show only SGQ code for questions, selector shows only question description, so when we need to add/edit/view/delete quota we have to guess what is the question code / description for it.
Suggest to add SGQ code to questions selector

2. current questions sort order doesn't reflect questionnaire questions sequence, query order requires modifications

To fix: replace parts of querries (starting row 420 in quotarow.php, row 180 in quota.php ) in both files

To add SGQ to selector replace " CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ': ', lq.question) END as description, "

With " CONCAT( lq.sid, 'X', lq.gid, 'X', CASE WHEN lq.parent_qid = 0 THEN lq.qid ELSE CONCAT(lq.parent_qid, lq.title) END, ' -> ' , CASE WHEN lq.parent_qid = 0 THEN lq.question ELSE CONCAT(lq2.question, ' : ', lq.question) END) as description, "

To change sort order replace " ORDER BY g.group_order ASC, lq.question_order ASC "

With " ORDER BY CASE WHEN lq2.question_order IS NULL THEN lq.question_order ELSE lq2.question_order + (lq.question_order / 1000) END ASC "

Related branches

Alex (ddrmoscow)
Changed in quexs:
status: New → Fix Committed
Adam Zammit (adamzammit)
Changed in quexs:
importance: Undecided → Low
milestone: none → 1.12.1
Revision history for this message
Alex (ddrmoscow) wrote :

The same SGQ story with questionnaireprefill.php

To show SGQ code in selector change
" CASE WHEN qo.question IS NULL THEN q.question ELSE CONCAT(qo.question,' : ',q.question) END as description "
to
" CONCAT( q.sid, 'X', q.gid, 'X', q.qid, ' -> ' , CASE WHEN qo.question IS NULL THEN q.question ELSE CONCAT(qo.question,' : ',q.question) END) as description "

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.