criscmaia / gsdslack

GSD Slack
https://sciencegsd.slack.com/messages
0 stars 0 forks source link

Create site to upload excel file with users to be inserted #36

Open criscmaia opened 6 years ago

criscmaia commented 6 years ago

Done: https://gsd.mdx.ac.uk/gsdforms/addUserFromFile.php

"Documentation":

  1. create channel manually on Slack

    dev

    ops

    manager

  2. Bot will automatically add it to "slackChat" table. ! - to be tested

✓ 3. Upload the .xlsx file

✓ 4. check if userId already matches ✓ 4.1. YES: duplicated user. Save it to show warning message later. ✓ 4.2. NO: check if user first name + last name + email matches ✓ 4.2.1. YES: duplicated user. Save it to show warning message later. ✓ 4.2.2. NO: check if user email matches ✓ 4.2.2.1. YES: possible duplicated ID. Save it to show warning message later.

✓ 5. Insert new user in the database. ! - It will NOT overwrite userId UPLOADED with the one already in the DB. It will insert as a new user with different ID.

✓ 6. check if group id already in "group" table. ✓ 6.1. YES: get name.

✓ 7. Insert every new group in the database. ! - It WILL overwrite the UPLOADED group name with one from the DB.

✓ 8. Check if "userGroup" table has group + user. ✓ 8.1. YES: mark userGroup as "already in DB." ✓ 8.2. NO: insert new userGroup to the DB

btmatthew commented 6 years ago
  1. Bot will automatically add it to "slackChat" table. ! - to be tested Tested and works fine.

Can you include some step by step instruction on the page?

In the instructions could you please add a template of the Excel document? or a schema of how the data should be stored in excel table?

As a suggestion, you might want to change Excel xlsx file to CSV format?

criscmaia commented 6 years ago

There is a template already. It has some data so should be straightforward to replace with the real data. Can you give it a go and let know where it needs more details instructions please?

btmatthew commented 6 years ago

Where is the template? nvm found it

btmatthew commented 6 years ago

image

In your Excel template, you need to add the roleID, moduleID, and gender fields, please.

Right now all of these fields and null. @criscmaia

image

The group table is working fine