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

✨ Add Community relation to Pools #10364

Closed
4 tasks done
Tracked by #10690 ...
tristan-orourke opened this issue May 13, 2024 · 5 comments · Fixed by #11070
Closed
4 tasks done
Tracked by #10690 ...

✨ Add Community relation to Pools #10364

tristan-orourke opened this issue May 13, 2024 · 5 comments · Fixed by #11070
Assignees
Labels
feature New feature or request.

Comments

@tristan-orourke
Copy link
Member

tristan-orourke commented May 13, 2024

✨ Feature

Ensure all Pools, old and new, are associated with a Community.

🕵️ Details

Create a relationship between Pool and Community - a required (ie non-nullable) community_id field on the Pool table. For existing entities in the database, assign a community the same way we did for Requests (#10331).

Community id becomes a required field on the create Pool mutation. At the same time, remove the team_id field in the mutation input. Validation must ensure that the user has permission to create a pool in this community (create-any-pool or create-team-pool).

Replace the team dropdown In addition to the team dropdown on the Create Pool page, add a community dropdown. The communities that appear depend on the users roles: platform admins and the legacy roles (community admin and request responder) see all Communities. Users without those roles, but with Community Admin or Community Recruiter roles, can see the communities they are part of. (Basically, avoid inputs which will fail on the backend.)

🧑‍🎨 Designer

@Jerryescandon

📸 Screenshot

image

🙋‍♀️ Proposed Implementation

A lot of this work will just involve updating policies so that the new roles can interact with the appropriate queries and mutations.

🌎 Localization

(optional) Provide any new copy along with translations available.

✅ Acceptance Criteria

A set of assumptions which, when tested, verify that the feature was properly implemented.

  • Resolve TODOs associated to this issue by searching for 10364 in repository
  • migration adds a non-nullable community_id field to pools. Existing pools have the field populated based on their work stream (existing pools belong to digital unless they are ATIP work stream)
  • Add Pool.community relationship to schema and Eloquent model
  • Add community to Pool factory
  • Replace team with Add community in createPool mutation and validation. Policy must check that user permission to create-any-pool or create-team-pool in this Community's team.
  • also update "duplicate pool" dialog
  • Replace team with community input add it in beside, leave team, in Create Pool form. Users only see Communities in the dropdown they are will be allowed to use according to validation.
  • Community Admin and Community Recruiter roles can access Create Pool page
  • PHPUnit tests that each of these roles can and cannot do the appropriate actions.
  • Playwright tests that appropriate roles can do this through UI?

🛑 Blockers

Issues which must be completed before this one.

Blocked By

  1. 2 of 2
    debt
    vd1992
  2. 1 of 1
    debt
    esizer
  3. 2 of 2
    deployment tooling
    vd1992
  4. feature
    petertgiles

🚚 Deployment

Run sync-roles script.

@tristan-orourke tristan-orourke added the feature New feature or request. label May 13, 2024
Copy link

github-actions bot commented May 13, 2024

Status: Error ⚠️

Issues blocking this PR:


This comment was automatically written by the Blocking Issues bot, and this PR will be monitored for further progress.

@github-actions github-actions bot added the blocked: dependencies Blocked by other issues. label May 13, 2024
@tristan-orourke tristan-orourke changed the title ✨ Update Pools with Communities [WIP] ✨ Update Pools with Communities May 14, 2024
@tristan-orourke tristan-orourke changed the title [WIP] ✨ Update Pools with Communities ✨ Update Pools with Communities May 31, 2024
@tristan-orourke tristan-orourke added the review in refinement Ready to be looked at and pulled into "ready to dev" label Jun 3, 2024
@petertgiles
Copy link
Contributor

@tristan-orourke please break this up

@tristan-orourke tristan-orourke changed the title ✨ Update Pools with Communities ✨ Add Community relation to Pools Jun 6, 2024
@petertgiles petertgiles removed the review in refinement Ready to be looked at and pulled into "ready to dev" label Jun 6, 2024
@brindasasi brindasasi removed the blocked: dependencies Blocked by other issues. label Jul 22, 2024
@vd1992
Copy link
Contributor

vd1992 commented Jul 22, 2024

@tristan-orourke

If the teamId field is being left in the create mutation, what should it reference now? Community comes from community table, should teamId now point at the community->team() relation?
Should team even be selectable by a user?

Conflict

image

image

@vd1992 vd1992 added the blocked: question Further information is requested. label Jul 23, 2024
@tristan-orourke tristan-orourke self-assigned this Jul 23, 2024
@tristan-orourke
Copy link
Member Author

Okay, sorry for the confusion. The screenshot is inaccurate. We will leave the team select input as is right now, and simply add a Community select. There is no relation between this Team and this Community! This Team select will be removed in the cleanup ticket.

@tristan-orourke tristan-orourke removed the blocked: question Further information is requested. label Jul 24, 2024
@tristan-orourke tristan-orourke removed their assignment Jul 24, 2024
@Jerryescandon
Copy link

Updated screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants