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

feat: add structure import from csv #1138

Merged
merged 4 commits into from
May 6, 2024
Merged

feat: add structure import from csv #1138

merged 4 commits into from
May 6, 2024

Conversation

spaenleh
Copy link
Member

@spaenleh spaenleh commented Apr 9, 2024

This PR adds support for the new import CSV feature.

In general:

  • the handling of the CSV import is now handled in the backend. The frontend only reads the header of the file to determine if a group column is present.
  • if there is a group_name column, then the user has the possibility to select an item that will be used as the template for the groups.
Screenshot 2024-05-03 at 11 43 30

In the following video, I import a file that results in 1 membership and 1 invitation.

import.users.csv.mov
import.groups.mov

@spaenleh spaenleh added the feature New feature or request label Apr 9, 2024
@spaenleh spaenleh self-assigned this Apr 9, 2024
@spaenleh spaenleh force-pushed the 689-teamwork-refactor branch from fa1b4e4 to 1175f56 Compare May 3, 2024 09:43
@spaenleh spaenleh marked this pull request as ready for review May 3, 2024 12:50
@spaenleh spaenleh requested review from pyphilia and ReidyT May 3, 2024 13:05
Copy link
Contributor

@ReidyT ReidyT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks nice, I will check this PR ! I just have few questions about the videos:

  • In the first one, why test 1 is not imported in the permission list ?
  • In general, could it be possible to add a preview of what the CSV will do ? For example, just listing the mails of the invited users in the first video and displaying the preview before confirming in the second one ? It is just a suggestion but it could be interesting I think.

@spaenleh
Copy link
Member Author

spaenleh commented May 3, 2024

@ReidyT Thank you for the comment.

  1. In the first video, there are 2 emails in the csv file, [email protected] is already a member, so a membership is created, [email protected] is not a member, so an invitation is created. You do not see the invitations table in the screen but the invitations is created correctly.
  2. I think a plan feature would be really nice indeed, but for the moment it has not been implemented. We do very basic checks to ensure that the file has the minimal required columns ("email") and we try to detect the "group_name" column so show the template selection UI.
  3. what could also be added is the possibility to select any type of item. Currently the selection dialog only allows folders but the structure feature would allow to create groups for single items.

Copy link
Contributor

@ReidyT ReidyT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice PR ! LGTM I just le some comments 🫠

src/components/item/sharing/ItemSharingTab.tsx Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/components/item/sharing/ItemSharingTab.tsx Outdated Show resolved Hide resolved
@spaenleh spaenleh force-pushed the 689-teamwork-refactor branch from e1090fb to 58e95f8 Compare May 6, 2024 07:26
Copy link

sonarqubecloud bot commented May 6, 2024

Quality Gate Passed Quality Gate passed

Issues
5 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@spaenleh spaenleh merged commit a4ad84e into main May 6, 2024
4 checks passed
@spaenleh spaenleh deleted the 689-teamwork-refactor branch May 6, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request v2.21.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants