-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow conditional fields / question logic / ordering #1772
Comments
I can imagine that a handful of specialized users (Smithsonian, USGS) would make use of this kind of functionality as they did with mandatory questions, but these are the sorts of overly complex features that we sought to remove from our previous version and deemed out of scope for a simple wizard tool. If there is some simple, low effort way to achieve this I'm happy to explore it though. |
I was about to add a similar issue requesting this, if you do decide to go ahead and are looking for institutions to test than Manchester would be really keen to do this. |
Great, thanks @rosiehigman If you could add details about the kind of functionality you'd be looking for (is it literally just the 'if no, skip to question 6' use case or more?) that would be really helpful. |
Hi @sjDCC, I think the primary use case would be if users only selected 'no personal or sensitive data' on Q9 of our Manchester section of each plans then it would skip to Q15 (saving researchers lots of time!). I suppose this is slightly more complicated in that it is a question where they can select multiple options and we would only want it to skip questions if this was the only option selected. If this was available we would probably implement it in a couple of places on our templates and may want to nest some conditionality e.g. If yes, skip to question 6, if yes on Q6 then skip to Q8, if no on Q6 then skip to Q7. |
Hi @sjDCC and @stephaniesimms, do you have any idea if this is likely to be developed/what the time frame for this will be? This has been requested again from several schools and a senior committee this morning. Thank you! |
@sjDCC & @stephaniesimms - I fully second @rosiehigman plea for conditional questions - this is a huge deal breaker for us (and other colleagues in the Netherlands I spoke with) |
The need for conditional questions was validated in the NL & UK user groups. Some notes from sessions below to help scope this out:
We propose it as a discrete feature development for this Summer. It was the top priority item |
This was demonstrated at user group. Suggested changes were as follows:
|
@raycarrick-ed will work on this and can wait until the next release. |
Ray continuing to work on this during the week and will write up notes on functionally issues and bugs so we can make decisions about how the feature is intended to work. |
I suspect the logic of this is not what we want in the long term but at this point, it is probably better to go with what we have at the moment and then get people's reactions to it. Issues I can see are:
|
A few notes from testing:
|
We did a whole series of UAT together and found several issues:
|
It looks like all the funky-behavior may be down to template versioning. I've fixed that logic, but to re-test, you'll need to re-set the conditions and re-publish the templates. |
I wonder if this is a process issue. Once the options have been created, you need to save the question before you can then go back in to add the conditions. This screenshot looks like it is in the state where it has created but not saved. After the save of the question the button should then be active. The issue with the color is a different thing not connected. That will probably be something not set up right in the deployment. |
@raycarrick-ed will add mouseover text to the Add Conditions button in order to prompt users to save a new question before they Add Conditions. |
@raycarrick-ed will check the log for emails to make sure they are getting through |
More explicit tooltip added to make logic clearer in: 78e52fe |
removes a funky question option reordering that was being done. I think it was probably intended to catch the case where someone added a condition and changed an option at the same time but it was reassigning the question option ids based on whatever order they came out of the DB. So if you had 3 options "Yes, No & Maybe" and set a condition on "Yes" it might, in the process of saving reassign the condition to be triggered by "Maybe". Hadn't spotted this before. |
I was able to successfully add a condition (after saving first this time!). I didn't see a tooltip on the Add Condition button prompting users to save their question first. Was that deployed? Also noticed the Add Condition button is not changing color. Tested notifications and successfully received the email. @briri We'll need to change the email text to include DMPTool info. |
Thanks for the clarification, Ray. It looks good to me; passing to @magdalenadrafiova & @sjDCC for final UAT. |
Thanks @raycarrick-ed Have tested this on an existing template and all worked well. Correct actions were followed based on conditions set and email notifications received. It means template versioning is working. I also saw the tool tip. Will try to break it in next half hour before noon telecon but bodes well... |
OK, on testing further I think I have found three bugs. @magdalenadrafiova @mariapraetzellis can you try to examine these further:
This and issue 2 seem to be about versioning. Perhaps conditions aren't replicating through properly in cloning process?
|
Number 1, loss of options isn't to do with the conditions, looking at the versions of that template. The versions were lost some time back (Jan 2019) so I'd gues it was a bug at that pointwhich has since been fixed. Worth double checking by creating a new template with options and then adding conditions but I think it's ok now. |
Number 3 was a duff comparison between the conditions set and the options chosen. They are now sorted first to ensure consistent ordering: |
Number 2 here turned out to be really horrible. When we update a published template, we create a new version. At that point all of the ids in the condition we have got back from the form may be wrong. So the condition has an option list of question option ids which may have changed in the versioning and so need to be rewritten in the params so we can do the update properly. Likewise the question numbers stored in the remove question array may have changed and they could be any question in the template. So this fixes up both of those. to test:
|
Pulled this back into review because it's not just a small bug fix. There's quite a bit of change in here so in needs more eyes on it. |
worked well for me |
Yay! Have just tested every eventuality and it all worked beautifully for me too. Thanks for all the work @raycarrick-ed With great pleasure I declare this closed! |
YEY! |
The question of conditional fields has been raised as a feature request several times (i.e. If no, skip to q6). I'd like to consider adding it to the list and scoping out how much work it is to implement.
Thoughts @stephaniesimms @briri @xsrust @Bodacious
Has there been demand for this in the USA?
Mandatory questions were requested in the past too but there had been issues with this in DMPTool so we may want to keep that out of scope
The text was updated successfully, but these errors were encountered: