Ignore deleted team members on project's page#320
Merged
shalapatil merged 4 commits intodevelopfrom Apr 25, 2022
Merged
Conversation
Current Code Coverage Percent of this PR:99.52 %Files having coverage below 100%
|
rohitjoshixyz
suggested changes
Apr 25, 2022
Contributor
rohitjoshixyz
left a comment
There was a problem hiding this comment.
Try to split the spec into more scenarios.
In this case,
For company_users#index they could be
it "lists company 1 company_users"
"does not list company 2 company_users"
"does not list discarded company users"
…ub.com/saeloun/miru-web into ignore-deleted-team-members-on-project
rohitjoshixyz
approved these changes
Apr 25, 2022
Contributor
rohitjoshixyz
left a comment
There was a problem hiding this comment.
1 suggestion, rest LGTM 🎉
| end | ||
|
|
||
| it "does not return the discarded users of company1" do | ||
| expect(json_response["users"].map { |user| user["id"] }).not_to include user4.id |
Contributor
There was a problem hiding this comment.
Suggested change
| expect(json_response["users"].map { |user| user["id"] }).not_to include user4.id | |
| expect(json_response["users"].pluck("id").not_to include user4.id |
| end | ||
|
|
||
| it "does not return the users of company2" do | ||
| expect(json_response["users"].map { |user| user["id"] }).not_to include user3.id |
Contributor
There was a problem hiding this comment.
Suggested change
| expect(json_response["users"].map { |user| user["id"] }).not_to include user3.id | |
| expect(json_response["users"].pluck("id")).not_to include user3.id |
Contributor
|
@apoorv1316 Please test this is working as expected. If yes, please merge |
Collaborator
|
It's working fine. We can merge this once Rohit's suggestions are implemented. @supriya3105 @shalapatil |
vipulnsward
pushed a commit
that referenced
this pull request
Feb 15, 2026
* Ignore deleted team members on project's page * Ignore deleted team members on project's page * Use pluck instead of map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notion card
https://www.notion.so/saeloun/Able-to-add-a-deleted-team-member-to-project-team-5fc1026dbe544a2c9a45067be9a0f6fd
Summary
Deleted team members were available in project team members add dropdown. Fixed it to not show deleted team members.
Preview
Type of change
Please delete options that are not relevant.
not work as expected)
How Has This Been Tested?
Checklist: