Skip to content

[WEB-4192]fix: inactive member is hidden in created by#7435

Merged
sriramveeraghanta merged 1 commit intopreviewfrom
fix-inactive_members_data
Jul 18, 2025
Merged

[WEB-4192]fix: inactive member is hidden in created by#7435
sriramveeraghanta merged 1 commit intopreviewfrom
fix-inactive_members_data

Conversation

@vamsikrishnamathala
Copy link
Member

@vamsikrishnamathala vamsikrishnamathala commented Jul 18, 2025

Description

This update fixes the issue where inactive user is hidden from Created by in a work item.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Summary by CodeRabbit

  • New Features

    • Added support for tracking the active status of workspace members across the app.
  • Bug Fixes

    • Ensured only active workspace members are displayed in the members list.
  • Chores

    • Updated data structures to include an optional active status property for workspace members.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 18, 2025

Walkthrough

The changes update the handling of workspace member activity status across both backend and frontend. The backend now returns all members regardless of their active status, while the frontend filters to display only active members. Type definitions and store logic are updated to include the optional is_active property for workspace members.

Changes

Files/Paths Change Summary
apps/api/plane/app/views/workspace/member.py Removed the is_active=True filter from the queryset in WorkSpaceMemberViewSet.get_queryset.
apps/web/core/components/workspace/settings/members-list.tsx Added filtering to only include members with is_active set to true in memberDetails.
apps/web/core/store/member/workspace-member.store.ts Extended interfaces and logic to support the optional is_active property for members.
packages/types/src/workspace.ts Added optional is_active?: boolean to IWorkspaceMember interface.

Sequence Diagram(s)

sequenceDiagram
    participant Client (Web)
    participant API
    participant DB

    Client->>API: Request workspace members
    API->>DB: Query all members (no is_active filter)
    DB-->>API: Return all members (active + inactive)
    API-->>Client: Return all members
    Client->>Client: Filter members (is_active == true)
    Client->>Client: Display only active members
Loading

Suggested labels

ready_to_merge

Suggested reviewers

  • sriramveeraghanta

Poem

In the warren of code, a change hops through,
Now all the members—old and new—
Are fetched from the backend, a full, lively crew,
But only the active are shown in view.
With types updated and logic tight,
The rabbit approves—this feels just right! 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@makeplane
Copy link

makeplane bot commented Jul 18, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/web/core/components/workspace/settings/members-list.tsx (1)

50-52: Handle undefined is_active values explicitly.

The filtering logic correctly excludes inactive members, but consider handling the case where is_active is undefined. Since this is an optional property, you might want to be more explicit about whether undefined should be treated as active or inactive.

Consider this more explicit approach:

  const memberDetails = searchedMemberIds
    ?.map((memberId) => getWorkspaceMemberDetails(memberId))
-   .filter((member) => member?.is_active);
+   .filter((member) => member?.is_active !== false);

This treats undefined as active, which is likely the desired behavior for backward compatibility.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7136b31 and 75221e7.

📒 Files selected for processing (4)
  • apps/api/plane/app/views/workspace/member.py (1 hunks)
  • apps/web/core/components/workspace/settings/members-list.tsx (1 hunks)
  • apps/web/core/store/member/workspace-member.store.ts (3 hunks)
  • packages/types/src/workspace.ts (1 hunks)
🔇 Additional comments (5)
packages/types/src/workspace.ts (1)

86-86: Clean type extension for active status tracking.

The addition of the optional is_active property to the IWorkspaceMember interface is well-designed and maintains backward compatibility while enabling the new functionality to distinguish between active and inactive members.

apps/web/core/store/member/workspace-member.store.ts (3)

22-22: Good interface extension for workspace membership.

The addition of the optional is_active property to the IWorkspaceMembership interface is consistent with the type definitions and enables proper tracking of member active status in the store.


179-179: Proper propagation of active status in member details.

The is_active property is correctly propagated when constructing the IWorkspaceMember object returned by getWorkspaceMemberDetails. This ensures the frontend components receive the active status information.


212-212: Correct storage of active status from API response.

The is_active property is properly stored when setting member data in the store, ensuring the active status information from the backend is preserved in the client-side store.

apps/api/plane/app/views/workspace/member.py (1)

36-36: Correctly removes active filter to include all members.

The removal of .filter(is_active=True) from the base queryset is the right approach to fix the issue. This allows the API to return all workspace members (both active and inactive), enabling the frontend to make appropriate filtering decisions. Other methods in the class still appropriately filter by is_active=True where needed for operations that should only work with active members.

@sriramveeraghanta sriramveeraghanta merged commit d7d1545 into preview Jul 18, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix-inactive_members_data branch July 18, 2025 14:39
@coderabbitai coderabbitai bot mentioned this pull request Sep 23, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants