Project

General

Profile

Actions

Defect #42661

open

Add multiple members to a projet error

Added by Brice Beaumesnil about 2 months ago. Updated 4 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Hello,

To check the defect, i just install REDMINE 5.1.8 stable branch on a server with a new RUBY 3.2.8 install too :

Environment:
Redmine version 5.1.8.stable
Ruby version 3.2.8-p263 (2025-03-26) [x86_64-linux]
Rails version 6.1.7.10
Environment production
Database adapter PostgreSQL
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
Redmine settings:
Redmine theme Default
SCM:
Git 2.39.3
Filesystem
Redmine plugins:
no plugin installed

When i try to add several member in the same time to a projet, REDMINE have an error :

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "members_pkey"
DETAIL: Key (id)=(444) already exists.

If i try one by one : no problem
I think an external librairies who's updated in this new installation make this regression because my production server in REDMINE 5.1.6 works fine.

thanks for your job.

Actions #1

Updated by Brice Beaumesnil about 2 months ago

I try with a copy of my production server :

If i make a bundle update, the same error appear.

Actions #2

Updated by Brice Beaumesnil about 2 months ago

Without bundle update i have this error with the same ruby et same remdine installation. But not in production.

I think it's a latency problem. I don't have any other idea

Actions #3

Updated by Holger Just 4 days ago

It may be possible that you (or someone else) has manually edited the database. Here, it may be possible that someone has added members without updating the primary key sequence for the members table in the database. When inserting a new record, the automatically set primary key id from the sequence may then conflict with an existing record.

Check your database and ensure that the sequence values is larger than the highest ID in the members table.

Actions #4

Updated by Holger Just 4 days ago

  • Category changed from Project settings to Database
Actions

Also available in: Atom PDF