Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As an administrator, I want to upload a CSV to bulk invite users to join COs. #1676

Open
logan-life opened this issue Nov 5, 2024 · 1 comment
Assignees
Milestone

Comments

@logan-life
Copy link
Contributor

logan-life commented Nov 5, 2024

Summary

Specific context: UU Yoda Data Managers currently use a bulk upload process for inviting users to join COs. The scale tends to be on the order of tens of users invited per week.

Beyond the UU Yoda specific use case, in general it is a common workflow for people at the Data Manager / Unit Manager / Researcher Support level to work with CSVs for bulk operations.

Acceptance Criteria

  • The user can be an Organization Administrator, Organization Manager, or Unit Manager.
  • The user can only successfully generate invitations for COs that fall under their purview (e.g. if the user is a Unit Manager, then the CO must fall within one of the user's Units)
  • The user is presented with a screen describing the required CSV schema and providing an example of a valid schema with dummy values.
  • The CSV file is validated for format and content before attempting to process the invitations.
  • The user is informed if the CSV validation was successful or unsuccessful.
  • If the CSV validation was unsuccessful, the user is informed as much as possible about why and where a problem occurred (Missing required value X on line Y, malformed value A on line B, etc)
  • If the CSV validation was unsuccessful, no invitations are sent.
  • If the CSV validation was successful, the user is informed that the import succeeded and that SBS will attempt to send out the invitations.
  • Successful invitations are sent and use the existing invitation workflow for notifications
  • Unsuccessful invitations trigger an email-based notification per unsuccessful invitation to the uploading user. This email should include the reason for the error (e.g. "User not found, CO not found, Group not found, Admin doesn't have permission, etc)
  • Successful invitations can be viewed using the existing functionality within SBS (Invited status in the Members tab of a CO)
  • Unsuccessful invitations (401 permission denied to unit manager, CO 404, Group 404, etc) trigger an email notification the user. Unsuccessful invitations do not appear in the SBS UI.
  • A user may re-import a previously imported CSV without any issues, in principle. For invitations sent via the prior import (or non-bulk process) that have not yet expired, the invitation should not be sent again and no error notification should be sent to the user. For invitations sent via the prior import (or non-bulk process) that have expired, new invitations are generated and sent per existing logic and workflow.

Complex Cases

  • Because the CO and Group columns can have multiple values informing the user of Group 404 error for a given CO + Group combination may be a little tricky. Need to come up with a solve for this.

Nice To Have

  • More detailed feedback about a successful validation - show a table with the some information about what SBS understands from the import.
  • After being provided with the more detailed feedback after a successful validation, there is a "process" button that acts as a confirm step. Only after clicking the process button does SBS attempt to batch out the invitations.
  • See screenshot for example UI for this part
    image
  • Allow the user to provide the membership_expiry_date and invitation_expiry_date as ISO 8601 Date-Only values (e.g. "2024-12-31") instead of epoch_seconds
  • Allow the user to optionally provide a CO label or list of CO labels instead of CO short_name or list of CO short_name(s) and use the label to lookup which COs the invitations should be sent to.

Notes

  • DELETE invitation is out of scope for bulk upload operations

CSV Schema

  • 8 columns
  • Follows the conventions of the Org API
  • The first example shows single-values:
    • Send one invitation to [email protected] to join the cumulusgrp CO with the Admin role and add them to the group ID 301ee8e6-b5d1-40b5-a27e-47611f803371. The invitation expires at epoch seconds provided, and the user's membership in the CO expires at epoch seconds provided. The message and sender_name are included in the invitation.
  • Second example shows multi-values:
    • Send four invitations - [email protected] + cumulusgrp, [email protected] + cirrusgrp, [email protected] + cumulusgrp, [email protected] + cirrusgrp and each with the Member role. Add the users to the group IDs supplied in the COs that the group belongs to (possible sticky point, see Complex Cases). The invite_expiry and membership_expiry are not provided, so use platform default logic. The message is provided. The sender_name is not provided, so use the default.
  • Example CSV is attached: bulk-import-example.csv
short_name(s) intended_role invitee(s) group(s) invitation_expiry_date membership_expiry_date message sender_name
string, required, multiple values allowed string, required, [admin,member] string (email address), required, multiple values allowed string, optional, multiple values allowed number, optional, defaults to current default logic number, optional, default to current default logic string, optional, no default string, optional, default to current logic
---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
cumulusgrp admin [email protected] 301ee8e6-b5d1-40b5-a27e-47611f803371 1743014227174 1743014227174 Please join the Cumulus research group collaboration page. Organisation XYZ
cumulusgrp, cirrusgrp member [email protected], [email protected] 301ee8e6-b5d1-40b5-a27e-47611f803371, 412ee9e8-b6d2-51b6-a38e-58722f914482 Please join our collaborations
@logan-life logan-life converted this from a draft issue Nov 5, 2024
@ccacciari
Copy link

Image

@logan-life logan-life self-assigned this Nov 6, 2024
@logan-life logan-life moved this from New to Needs refinement in SRAM development Nov 6, 2024
@logan-life logan-life added the discuss Needs to be discussed; do not implement as is. label Nov 7, 2024
@logan-life logan-life moved this from Needs refinement to New in SRAM development Nov 7, 2024
@logan-life logan-life moved this from New to Todo in SRAM development Dec 2, 2024
@logan-life logan-life added this to the v40 milestone Dec 2, 2024
@logan-life logan-life removed the discuss Needs to be discussed; do not implement as is. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants