GithubHelp home page GithubHelp logo

Comments (4)

dodumosu avatar dodumosu commented on June 3, 2024

@takinbo please describe the desired result and how it differs from what currently obtains.

from apollo.

takinbo avatar takinbo commented on June 3, 2024

@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.

dodumosu avatar dodumosu commented on June 3, 2024

@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.

takinbo avatar takinbo commented on June 3, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.