Cadasta / cadasta-qgis-plugin

[DEPRECATED] QGIS plugin to create, edit, upload and download Cadasta projects
GNU General Public License v3.0
4 stars 7 forks source link

Remove index and constraint from json properties in "create project" #243

Closed SteadyCadence closed 7 years ago

SteadyCadence commented 7 years ago

I want to keep the json schema as simple as possible. We can remove "index" and "constraint" from the field objects.

Also, please remove this "title" field that shows up on all new projects:


            "index": 5, 
            "relevant": null, 
            "name": "title", 
            "constraint": null, 
            "default": null, 
            "hint": null, 
            "required": false, 
            "label": "Cadasta Platform - UAT Survey", 
            "type": "NO"```
dimasciput commented 7 years ago

@SteadyCadence If I remove index in questionnaire then I get this error message :

Error 400 : {"question_groups": [{"questions": [{"index": ["This field is required."]}, {"index": ["This field is required."]}, {"index": ["This field is required."]}, {"index": ["This field is required."]}, {"index": ["This field is required."]}]}]}
oliverroick commented 7 years ago

index is required for all questions, question groups and options.

dimasciput commented 7 years ago

I remove the index from the advanced view, the index will be added before the questionnaire uploaded.

SteadyCadence commented 7 years ago

Perfect, @dimasciput! I think that works better-- to have the index added after the questionnaire has been edited.

Thank you!

SteadyCadence commented 7 years ago

Looks much cleaner. Could you also remove this field: { "relevant": null, "name": "title", "hint": null, "default": null, "required": false, "label": "Cadasta Platform - UAT Survey", "type": "NO" This field is really only for ODK and it is not needed.

SteadyCadence commented 7 years ago

I am not sure how the index is being signed. When I tried to add a custom field, I got a 400 error about the index. Screen Shot 2017-08-10 at 10.06.46 PM.png

dimasciput commented 7 years ago

@SteadyCadence Can you copy paste your json here.

dimasciput commented 7 years ago

@SteadyCadence are you still having this issue?

dimasciput commented 7 years ago

@SteadyCadence have you got any chances to review this?

SteadyCadence commented 7 years ago

I don't seem to get that error so I think its fixed.