View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|12402||Feature requests||[All Projects] Survey design||public||2017-05-16 20:17||2017-07-19 13:41|
|Target Version||Fixed in Version|
|Summary||12402: Use JQuery QueryBuilder for defining Quotas|
|Description||The limitations of using quota-s has been a problem for LS for year for my experience. |
- "or" logic not supported
- a number of quetion types not supported
I have raised my voice on this also before. Eg- here
I had a thought of using the EM logic also for quota, but after looking into it, I realized that EM is more for horizontal processing (inside one response) and is not suited for veritical -> building queries to DB.
I would suggest testing to use the JQuery QueryBuilder for composing the Quota logic
It enables the usage of much more complex logic while keeping the query secure.
I have used the Yii2 querybuilder package from https://github.com/leandrogehlen/yii2-querybuilder
for yii1 probably could use something like https://github.com/mistic100/jQuery-QueryBuilder
I have a bit of experience of using it with yii2 and I could take on testing this if this seem like realistic way to go in the future
comments & thumbs in both directions are welcome to see if it is worth testing or not
|Tags||No tags attached.|
I think we can just add Équation question type in Quota Gui edit : then we can make any quota (and we don't break existing quota).
Currently : the php code for public quota part is ready for Équation.
About SQL builder : i like it in "browse"/"export"/"Statistics" but not for quota :)
Equation question type in Quota seems like a good idea. I'll have a bit of look into that too.
I'm currently working on creating a widget for yii1. If its usable then it might be for for various purposes. Even if not for LS :)
based a bit on similar yii2 version
Why should the builder not be used for quota? Beside bundling issues?
Since EM is similar to a blackbox which nobody likes to touch it sounds like a good idea to stay away from EM till a refactoring of EM is done.
If LimeSurvey GmbH still wants to conquer the survey SaaS market, the quota system is competing against something like this. https://help.surveygizmo.com/help/logic-vs-distributed-quotas
The way LS GmbH is promoting the current quota functionality towards potential market research customers is a bit confusing, When first reading it I thought there was a new quota system already is place.
About EM : for dev yes : it's complicated, but for user : it's really great and seems a lot used.
Like write on another bug report : currently if you kinow how to hack database to add an Equation question type : you have the system wuth Équation.
With a new complete system to make SQL :
1. How SQL security is managed ? Maybe there are a lot of security issue (didn't know).
2. How manage updating survey ? For example : SQL use question 22, we remove question 22 : we must search on a SQL string if question 22 is used. With current situation : really more easy
3. Adding a GUI on admin part : we can broke GUI but we don't broke public part.
I think this 3 point are really important to think of "Can we use another solution than a complete new solution". And if you want to talk about Saas VS concurrent : i don't care personnaly.
I have nothing against EM - :)
If we have a simpler way of making quotas more flexible (eg Equation) I would support that initially,
Regarding the QueryBuilder. The idea is that the criterias are stored in DB not as SQL but as JSON structred as QueryBuilder outputs. Security is the idea why I have been using querybuilder instead of plain text criterias. Since data is stored as structured JSON its really easy to process that and manage security. There is a Translator to translate the JSON to SQL and all security can be managed there: eg:
PS : have an hacked version of jquerybuilder to construct relevance (and replace current condition part) can be a great idea ;) too
PS2 : https://github.com/leandrogehlen/yii2-querybuilder/blob/master/Translator.php great ! Must test your extension in https://framagit.org/SondagePro-LimeSurvey-plugin/exportFilter ;)
here's a first demo for the yii1-querybuilder widget
|NEED IT for browse export. Replace current statistics filter ?|
||Summary||Use JQuery QueryBuilder for definign Quotas => Use JQuery QueryBuilder for defining Quotas|
||Relationship added||related to 07598|
|2017-07-18 15:14||DenisChenu||Note Added: 44100|
||Note Added: 44101|
|2017-07-18 16:38||jelo||Note Added: 44102|
|2017-07-18 16:58||DenisChenu||Note Added: 44103|
||Note Added: 44104|
|2017-07-18 17:32||DenisChenu||Note Added: 44105|
|2017-07-18 17:34||DenisChenu||Note Edited: 44105||View Revisions|
||Note Added: 44108|
|2017-07-19 13:41||DenisChenu||Note Added: 44110|