Comments (4)
@takinbo please describe the desired result and how it differs from what currently obtains.
from apollo.
@dodumosu there are fields that must be mapped and those that are optional. Before commencing an import, validate that the required fields have been mapped and if not, display an error so it can be fixed.
from apollo.
@takinbo I realized that this isn't as straightforward as it might seem at first blush when I tried implementing it. Since we implemented imports to be used for both new data and updating existing data, checking for required columns in the map is way harder than it might seem, particularly for locations. For participants, the participant ID is always required, but after that, it seems everything else can be optional.
To give a participant example: suppose we have a set of participants for observation, but recruitment is not complete. We might have a set of participant IDs, roles and location IDs, but that's all. Suppose after recruitment is completed, we want to update that set with names and phone numbers. The system should be able to update the data set without requiring the location IDs or roles again. Just the participant ID, name and phone numbers would be specified, and only the first would be required.
For locations, it's similar, except that you might even just want to update a specific location level with specific information, for example, an update to polling station registered voters. You should be able to specify just the polling station ID and the registered voters.
For validation of location mapping, i believe what's necessary is to require that for any level that some column is mapped, the location ID for that level is also mapped. Other than that, I don't think we can put any restrictions on what is required or not.
from apollo.
@dodumosu testing reveals that this doesn't work as expected. From reading the code, it appears it is supposed to validate the specification of a column for the location type code when a location type name is specified but in my tests, it does not correctly validate.
Also, there doesn't appear to be any validation requiring that the participant id be specified in a participant file upload. I was able to select a file and click upload without specifying a column for the participant id.
from apollo.
Related Issues (20)
- Location column causes issues when filled HOT 1
- Match help text for survey creation to template HOT 1
- When sorting by moment, have time/dates that are filled in always appear first HOT 1
- Data Summary doesn't generate for survey forms HOT 2
- Improved sorting for Form ID/Participant ID HOT 1
- Editing survey responses registers on the dashboard as another response HOT 2
- Issues with moment time HOT 5
- Ability to filter by a Form ID?
- Rename first App question from "Form Serial" to "Form Serial Number"
- When a filter is applied to the map view, stay on the map view
- Apollo not uploading large files HOT 3
- Sample filtering on the dashboard does not work HOT 1
- Rename 'Moment' to 'Timestamp'
- Add day by day breakdown feature to critical incidents HOT 1
- Redoing Bar Charts on Dashboard HOT 1
- Postgres container fails when upgrading from before to after #638 fix HOT 4
- Remove need for one top level location? HOT 1
- Sample with the same name should overwrite previous ones HOT 2
- ./manage.py not working inside containers
- Adding Participants to New Locations Appended to a Location Set Fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo.