Skip to content

CS-469 [BUG] - Inactive users to not be shown as an option when assigning Evidence tasks. All "Inactive" users should be hidden.#3320

Merged
tofikwest merged 3 commits into
mainfrom
chas/task-assignee
Jul 6, 2026
Merged

CS-469 [BUG] - Inactive users to not be shown as an option when assigning Evidence tasks. All "Inactive" users should be hidden.#3320
tofikwest merged 3 commits into
mainfrom
chas/task-assignee

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This is an automated pull request to merge chas/task-assignee into dev.
It was created by the [Auto Pull Request] action.


Summary by cubic

Hides inactive and deactivated users from assignee dropdowns and API results when includeDeactivated is false, per CS-469. Also sorts visible assignees alphabetically by name (fallback to email) for a cleaner picker.

Written for commit 01a86c3. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jul 6, 2026 3:32pm
comp-framework-editor Ready Ready Preview, Comment Jul 6, 2026 3:32pm
portal Ready Ready Preview, Comment Jul 6, 2026 3:32pm

Request Review

@chasprowebdev chasprowebdev changed the title [dev] [chasprowebdev] chas/task-assignee CS-469 [BUG] - Inactive users to not be shown as an option when assigning Evidence tasks. All "Inactive" users should be hidden. Jul 1, 2026
@linear

linear Bot commented Jul 1, 2026

Copy link
Copy Markdown

CS-469

@vercel vercel Bot temporarily deployed to Preview – portal July 1, 2026 16:28 Inactive
@chasprowebdev

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found and verified against the latest diff

Confidence score: 3/5

  • In apps/api/src/people/utils/member-queries.ts, the new isActive: true list filter can diverge from findByIdInOrganization behavior, so the same member may be hidden in list views but still retrievable by ID, leading to inconsistent API/UI behavior after merge — align the query predicates across list and by-ID paths (or explicitly enforce/validate impossible states) before merging.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/api/src/people/utils/member-queries.ts">

<violation number="1" location="apps/api/src/people/utils/member-queries.ts:69">
P2: Adding `isActive: true` to the list filter creates an inconsistency: members with `isActive: false` but `deactivated: false` (if such a state exists) are excluded from the list but still returned by `findByIdInOrganization`. Either both methods should apply the same filter, or the logic needs a clear invariant enforced elsewhere.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

where: {
organizationId,
...(includeDeactivated ? {} : { deactivated: false }),
...(includeDeactivated ? {} : { deactivated: false, isActive: true }),

@cubic-dev-ai cubic-dev-ai Bot Jul 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2: Adding isActive: true to the list filter creates an inconsistency: members with isActive: false but deactivated: false (if such a state exists) are excluded from the list but still returned by findByIdInOrganization. Either both methods should apply the same filter, or the logic needs a clear invariant enforced elsewhere.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/api/src/people/utils/member-queries.ts, line 69:

<comment>Adding `isActive: true` to the list filter creates an inconsistency: members with `isActive: false` but `deactivated: false` (if such a state exists) are excluded from the list but still returned by `findByIdInOrganization`. Either both methods should apply the same filter, or the logic needs a clear invariant enforced elsewhere.</comment>

<file context>
@@ -66,7 +66,7 @@ export class MemberQueries {
       where: {
         organizationId,
-        ...(includeDeactivated ? {} : { deactivated: false }),
+        ...(includeDeactivated ? {} : { deactivated: false, isActive: true }),
         ...(filters?.onboardAfter || filters?.onboardBefore
           ? {
</file context>
Fix with cubic

@cubic-dev-ai

cubic-dev-ai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@chasprowebdev chasprowebdev self-assigned this Jul 1, 2026
@tofikwest tofikwest merged commit 7a5286b into main Jul 6, 2026
10 checks passed
@tofikwest tofikwest deleted the chas/task-assignee branch July 6, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants