[Bug]: Members List in "Add Users" is not synced up with members list in board view #613

Closed
opened 2026-02-04 20:34:05 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @NikolaeVarius on GitHub (Nov 28, 2024).

Where is the problem occurring?

I encountered the problem while using the application (Frontend)

What browsers are you seeing the problem on?

Chrome, Firefox

Current behaviour

This issue popped up suddenly. I am currently updated to the latest v1.24.2, however it started before that (which prompted updating to the latest version). I am using the docker compose variant of the application.

We currently have 27 members in our Planka board. We tried to add a new user, however, even though the user shows up in the "Add Users" popup, they are not to be found on the kanban board "member" list. I then realized we had more members on the "Add Users" popup than the "members" list

I don't see any errors associated in either the planka or postgres logs

Desired behaviour

Users in the "Add Users" page should always sync with the "members" list

Steps to reproduce

  1. We have 27 users

image

  1. Our "members" currently has 27 users listed,

  2. Lets add an arbitrary dumb user zzzzzz@gmail.com that currently does not exist
    image

The user has been added and a 28th user was added
image

  1. Refreshed page and user is no where to be found., List remains at 27
    image
    image

Other information

Attempted to see if maybe DB writes are not getting through, but they must be because I see the email uniqueness constraint

image

2024-11-27T21:40:09.723388754Z 2024-11-27 21:40:09.723 UTC [273736] ERROR:  conflicting key value violates exclusion constraint "user_email_unique"
2024-11-27T21:40:09.723423025Z 2024-11-27 21:40:09.723 UTC [273736] DETAIL:  Key (email)=(zzzzzz@gmail.com) conflicts with existing key (email)=(zzzzzz@gmail.com).
2024-11-27T21:40:09.723427794Z 2024-11-27 21:40:09.723 UTC [273736] STATEMENT:  insert into "public"."user_account" ("avatar", "created_at", "deleted_at", "email", "is_admin", "is_sso", "language", "name", "organization", "password", "password_changed_at", "phone", "subscribe_to_own_cards", "updated_at", "username") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) returning *

Also I deleted my personal user from the "Add Users" page and I can still log back in with that user, but that user is not on the "Add Users" page, however it IS still listed on the "members" list and I have no issues with continuing with admin commands

Originally created by @NikolaeVarius on GitHub (Nov 28, 2024). ### Where is the problem occurring? I encountered the problem while using the application (Frontend) ### What browsers are you seeing the problem on? Chrome, Firefox ### Current behaviour This issue popped up suddenly. I am currently updated to the latest v1.24.2, however it started before that (which prompted updating to the latest version). I am using the docker compose variant of the application. We currently have 27 members in our Planka board. We tried to add a new user, however, even though the user shows up in the "Add Users" popup, they are not to be found on the kanban board "member" list. I then realized we had more members on the "Add Users" popup than the "members" list I don't see any errors associated in either the planka or postgres logs ### Desired behaviour Users in the "Add Users" page should always sync with the "members" list ### Steps to reproduce 1) We have 27 users ![image](https://github.com/user-attachments/assets/df96ba42-de80-4ddf-8d08-496f10249df0) 2) Our "members" currently has 27 users listed, 3) Lets add an arbitrary dumb user zzzzzz@gmail.com that currently does not exist ![image](https://github.com/user-attachments/assets/bf707d8c-9f51-409d-b8ef-ccf9b4b7e5ab) The user has been added and a 28th user was added ![image](https://github.com/user-attachments/assets/cf8e04d0-ee1c-4b70-94f2-b29f480d0106) 4) Refreshed page and user is no where to be found., List remains at 27 ![image](https://github.com/user-attachments/assets/aeb86765-1f7c-4206-a871-4f872c3d9408) ![image](https://github.com/user-attachments/assets/c9a5f723-ce84-43e5-a4ff-cb8aa3d6c84f) ### Other information Attempted to see if maybe DB writes are not getting through, but they must be because I see the email uniqueness constraint ![image](https://github.com/user-attachments/assets/c6c551dd-2368-4050-ab4c-4c751b723e71) ``` 2024-11-27T21:40:09.723388754Z 2024-11-27 21:40:09.723 UTC [273736] ERROR: conflicting key value violates exclusion constraint "user_email_unique" 2024-11-27T21:40:09.723423025Z 2024-11-27 21:40:09.723 UTC [273736] DETAIL: Key (email)=(zzzzzz@gmail.com) conflicts with existing key (email)=(zzzzzz@gmail.com). 2024-11-27T21:40:09.723427794Z 2024-11-27 21:40:09.723 UTC [273736] STATEMENT: insert into "public"."user_account" ("avatar", "created_at", "deleted_at", "email", "is_admin", "is_sso", "language", "name", "organization", "password", "password_changed_at", "phone", "subscribe_to_own_cards", "updated_at", "username") values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15) returning * ``` Also I deleted my personal user from the "Add Users" page and I can still log back in with that user, but that user is not on the "Add Users" page, however it IS still listed on the "members" list and I have no issues with continuing with admin commands
Author
Owner

@meltyshev commented on GitHub (Nov 28, 2024):

Hi! I'm trying to reproduce this, but so far everything is working correctly for me. It looks like two data sources are active simultaneously, trying to figure out why this might be happening.

@meltyshev commented on GitHub (Nov 28, 2024): Hi! I'm trying to reproduce this, but so far everything is working correctly for me. It looks like two data sources are active simultaneously, trying to figure out why this might be happening.
Author
Owner

@NikolaeVarius commented on GitHub (Nov 28, 2024):

Just for additional context, docker-compose process list

sudo docker compose ps
NAME        IMAGE                              COMMAND                  SERVICE    CREATED      STATUS                PORTS
planka      ghcr.io/plankanban/planka:latest   "docker-entrypoint.s…"   planka     4 days ago   Up 4 days (healthy)   0.0.0.0:3000->1337/tcp, [::]:3000->1337/tcp
planka_db   postgres:14-alpine                 "docker-entrypoint.s…"   postgres   4 days ago   Up 4 days (healthy)   5432/tcp

and yml

cat docker-compose.yml 
services:
  planka:
    container_name: planka
    image: ghcr.io/plankanban/planka:latest
    restart: on-failure
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/private/attachments
      - /opt/planka/logs/app:/app/logs
    ports:
      - 3000:1337
    environment:
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - TRUST_PROXY=0
    env_file:
        - .env
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    container_name: planka_db
    image: postgres:14-alpine
    restart: on-failure
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  user-avatars:
  project-background-images:
  attachments:

image

@NikolaeVarius commented on GitHub (Nov 28, 2024): Just for additional context, docker-compose process list ``` sudo docker compose ps NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS planka ghcr.io/plankanban/planka:latest "docker-entrypoint.s…" planka 4 days ago Up 4 days (healthy) 0.0.0.0:3000->1337/tcp, [::]:3000->1337/tcp planka_db postgres:14-alpine "docker-entrypoint.s…" postgres 4 days ago Up 4 days (healthy) 5432/tcp ``` and yml ``` cat docker-compose.yml services: planka: container_name: planka image: ghcr.io/plankanban/planka:latest restart: on-failure volumes: - user-avatars:/app/public/user-avatars - project-background-images:/app/public/project-background-images - attachments:/app/private/attachments - /opt/planka/logs/app:/app/logs ports: - 3000:1337 environment: - DATABASE_URL=postgresql://postgres@postgres/planka - TRUST_PROXY=0 env_file: - .env depends_on: postgres: condition: service_healthy postgres: container_name: planka_db image: postgres:14-alpine restart: on-failure volumes: - db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d planka"] interval: 10s timeout: 5s retries: 5 volumes: user-avatars: project-background-images: attachments: ``` ![image](https://github.com/user-attachments/assets/831256e2-2929-45e8-8d97-574c26a3bd0e)
Author
Owner

@meltyshev commented on GitHub (Nov 28, 2024):

Hmmm... So, if you open the Users Modal (with the list of all users) and then the Add Member popup without refreshing the page, do they display different users? That's very strange because users are loaded only once, and the source of users should be the same (with the only difference that the current user is not displayed in the Users Modal). Or does this issue only happen after refreshing the page?

@meltyshev commented on GitHub (Nov 28, 2024): Hmmm... So, if you open the Users Modal (with the list of all users) and then the Add Member popup without refreshing the page, do they display different users? That's very strange because users are loaded only once, and the source of users should be the same (with the only difference that the current user is not displayed in the Users Modal). Or does this issue only happen after refreshing the page?
Author
Owner

@NikolaeVarius commented on GitHub (Nov 28, 2024):

Same behavior either way. I only mentioned the refresh to show I attempted to force the user refresh
image
image
Still the same

@NikolaeVarius commented on GitHub (Nov 28, 2024): Same behavior either way. I only mentioned the refresh to show I attempted to force the user refresh ![image](https://github.com/user-attachments/assets/d1d9e6e6-dce4-42d6-99fd-6301cebdaacb) ![image](https://github.com/user-attachments/assets/c5441f22-95f0-4d66-a354-45e6e72bf3e8) Still the same
Author
Owner

@meltyshev commented on GitHub (Nov 28, 2024):

The current board users shouldn't change automatically when new users are added to the system. Instead, new users can be added to the board manually using the "+" button located to the right of the board users list. If you don't see this button, it means you are not a project manager (in which case, you also won't have permission to edit or delete boards).

If you're not a manager but should be, there are two options to resolve this:

  • If the project has another manager, you can add yourself as a second manager from their account.
  • If no managers exist (this can occur due to a bug when deleting a user), you may need to restore access through the console or database.

We already fixed this issue in v2 (which has not been released yet). Admins will be able to see all shared projects and add themselves as managers directly.

@meltyshev commented on GitHub (Nov 28, 2024): The current board users shouldn't change automatically when new users are added to the system. Instead, new users can be added to the board manually using the "+" button located to the right of the board users list. If you don't see this button, it means you are not a project manager (in which case, you also won't have permission to edit or delete boards). If you're not a manager but should be, there are two options to resolve this: - If the project has another manager, you can add yourself as a second manager from their account. - If no managers exist (this can occur due to a bug when deleting a user), you may need to [restore access through the console](https://github.com/plankanban/planka/issues/336#issuecomment-1320977926) or database. We already fixed this issue in v2 (which has not been released yet). Admins will be able to see all shared projects and add themselves as managers directly.
Author
Owner

@NikolaeVarius commented on GitHub (Nov 28, 2024):

Ah thanks I'll close this out.

I didn't know there was a Board manager role vs Admin role. This looks to be all sorted out now.

Thank you

@NikolaeVarius commented on GitHub (Nov 28, 2024): Ah thanks I'll close this out. I didn't know there was a Board manager role vs Admin role. This looks to be all sorted out now. Thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#613