Importing

A flexible importer will help make this tool at least as easy as current data management practices.

Greg will have current (and old) excel spreadsheets with something like the following columns:

Room Number
Desk Number (if used)
Name- of current occupant
Userid- of current occupant
Start Date (if used)
End Date (if used)
Supervisor Name
Supervisor userid
Notes
Group

We should be able to flexibly import room assignment data using this data.

  • Minimum: being able to import .csv. Being able to process an .xls file is a "nice-to-have"
  • Although it would be helpful to try and match name with a non-supplied userid, this is out of scope. If there isn't a userid column, we won't try to import. If there isn't userid data in the column, the user gets ignored with a warning.
    • for now, ignore the supervisor name and userid- that data is stored read-only for grad students in Odyssey. We will add tables to deal with adding this data, but this hasn't been pinned down yet.
  • Name of occupant and name of supervisor are ignored; as are any other column which isn't described in this document. (as below, display a warning for unknown fields. The name fields are just ignored.)
  • If the listed room doesn't exist, create the room with a single desk
  • If the room and desk already exist, only import the person
  • If the person exists but already has a room, move the person to the newly specified room/desk
  • If the data doesn't include new information (person, room, desk, supervisor, notes are all the same), simply report a warning (as below).
  • Group names must exactly match the text name of a group that already exists, with one exception noted below under "Minimum data".
    • A row may only contain one group, for simplicity of parsing. (see below under Minimum Data about adding multiple groups for a person...)
  • Additional columns not described in this document should be ignored.
  • There should be a validation stage before importing; which will signal any warnings or errors.
    • Warnings include 'Column "Whatever" doesn't match known columns; ignoring.' and 'Userid not listed for Name "Whatever". Ignoring.' and 'Row ignored because person "Whatever" is already in "DC Whatever Desk Whatever"' and "Group Whatever doesn't exist. Ignoring."
    • If there are date conflicts for a person, report them as warnings but let it proceed. (user is in two places at once- could mean they have multiple offices, possibly while they are moving)
    • If there are date conflicts for a desk, report them as errors.
  • The importing stage should output what was done.
  • All changes should be recorded in the transaction log

Batch field setting

The settable fields should be settable in batch; perhaps via a section at the top of the import page.
Room Number
Desk Number (if used)
Userid- of current occupant
Start Date (if used)
End Date (if used)
Notes
Group

Additional uses of the importer

The importer could have:
  • a room repeated for all entries, with different start/end dates and different occupants - to record history of a single room
  • a userid repeated for all entries, with different rooms and start/end dates - to record history for the userid.

Minimum data

  • If there is only a room column (with an optional Start Date/Notes column), only create the room/desk; in this case a Notes column applies to the room.
  • If there is only a groups column, create the group with that exact name. (In all other cases where a group name doesn't match, it's a warning).
  • If there is a userid column (but no room data) we can add notes/group data for that person.

-- DanielAllen - 2018-06-21

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2018-06-21 - DanielAllen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback