Suggestion: Import persons from csv #4247
nobodyzero1
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I really like the concept and design of organized—thank you so much for all the effort that has gone into it! I think it would be practical to add a button for importing person records next to "Add Person" on the "All Persons" page, which would allow importing new people from a CSV file. This would make it much easier to get started with the app, as you wouldn’t have to add each person manually.
Since I only saw the tip to start a discussion first just now, I have already tried to implement such a function in a local copy. To avoid duplicating code and to reuse existing logic, I would extract the logic from the current "handle" functions into separate functions. These could then be used for the CSV import, and the existing "handle" functions would also call these extracted functions, but would additionally update the person state (unlike the CSV import).
When clicking the import button, a window would open describing some requirements for the CSV file, and there would also be an option to download a template file with the required column headers. These headers are based on the PersonType properties, Enrollments, Privileges, and Assignments. To help users, the second row of the template contains translations of the headers in the user’s language. The assignments are determined dynamically, so no changes would be needed if new assignments are added in the future.
What do you think about such an import function? In the future, it could potentially be extended to also allow updating existing people.
Beta Was this translation helpful? Give feedback.
All reactions