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

Issue 5339 - Multiple jobs support #5377

Open
wants to merge 38 commits into
base: staging
Choose a base branch
from
Open

Conversation

ChristosTsiotsias
Copy link
Contributor

This fixes #5339

Description

Jobs are renamed to roles and have UUID ids and name
Migration script for updating issues, risks, tickets, templates and ticket logs added
Users can now be asssigned to multiple roles
Endpoints for creating / updating / deleting a role added
Respective v4 endpoints removed and an appropriate response is returned
Swagger documentation added
Unit and e2e tests added

Test cases

Migration script should run and update all necessary collections
Users should be able to create/update/delete a role using v5 endpoints
Old v4 endpoints should return appropriate error and point to the new endpoints

Copy link
Member

@carmenfan carmenfan left a comment

Choose a reason for hiding this comment

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

As discussed, we need to consider #5356 for this.

We want to instead migrate to frontegg to store our roles in their groups (so for e.g. if a new role is created, we call this : https://developers.frontegg.com/api/identity/user-groups/groupscontrollerv1_creategroup)

So edit and update should be going through frontegg (sorry 😢 🙈 )

if (!existingRolesMap[job._id]) {
const role = { ...job, name: job._id, _id: generateUUID() };
newRoles.push(role);
roleNamesToIds[role.name] = role._id;
Copy link
Member

Choose a reason for hiding this comment

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

Can we also add existing entries to roleNamesToId?

Just incase the script died in the middle and managed to add the roles but didn't update tickets/issues etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants