Red Hat Bugzilla – Bug 1011008
Duplicate entry 'ADMIN' for key 'PRIMARY' error raises when viewing tasks that user with role ADMIN can claim
Last modified: 2014-08-06 16:06:29 EDT
Created attachment 801643 [details]
Description of problem:
Having business central configured with production DB (tried with mysql55 and mssql2008R2), user with ADMIN role cannot see available tasks. Exception raises in server log (see the attached stacktrace) saying:
Duplicate entry 'ADMIN' for key 'PRIMARY'
Violation of PRIMARY KEY constraint 'PK__Organiza__3213E83F02B769D4'. Cannot insert duplicate key in object 'dbo.OrganizationalEntity'. The duplicate key value is (ADMIN)
I was able to see this issue when querying for tasks via REST, but it can be reproduced more easily via GUI.
Steps to Reproduce:
1. configure business central with production DB
2. log in using account with ADMIN role
3. navigate to Tasks -> Tasks list
4. see the server log
Version-Release number of selected component (if applicable):
this should already be solved by JBPM-4134 that introduced way to filter out some of the groups to not be used by task service. It mainly targets roles for web application as they are actually roles and not ht groups so should not be seen as groups in task service at all. By default analyst and admin roles are filtered out from being added to task service. More can be added to restricted-groups.properties file included in the web application (WEB-INF/classes)
Will the fix cover also quite similar issue with "Administrator"? That's because I see the exception in Postgresql 9.2. I use ADMIN group so I don't know where the Administration appeared from.
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "organizationalentity_pkey"
Detail: Key (id)=(Administrator) already exists.
there was additional fix on the way so moving this back to assigned as it won't be completely included in ER4
fixed in master: https://github.com/droolsjbpm/jbpm-console-ng/commit/0eb9c69b84c1af1a114d8b47cde1d6a432a8ee98
Verified on BPMS-6.0.0.ER4
qe_test_coverage: roles have been changed in business-central