Cannot merge Controlled Value List values

11 views
Skip to first unread message

Matthew Adair

unread,
Nov 18, 2025, 11:51:43 AMNov 18
to Archivesspace_Users_Group
We have a few stray Local Access Restriction Types that have been created from importing records. Unfortunately I don't seem to be able to merge these into our existing values. When I select Merge, select the value to merge into, a get the following error: "Failed to merge Value"

I have logs set to DEBUG and I don't see anything in them that indicates an error. 

I created two testing entries, and tried merging them with the same error.

Thanks,
Matt

----
Matt Adair

Archivist for Digital Imaging and Infrastructure

Bentley Historical Library
1150 Beal Avenue
Ann Arbor, Michigan 48109-2113
734-647-3537

Matthew Adair

unread,
Nov 19, 2025, 10:17:05 AM (14 days ago) Nov 19
to Archivesspace_Users_Group
A few more details on this...

I tried the "Migrate all records from one value to another" endpoint at   /config/enumerations/migration
The submitted JSON package like  {"enum_uri": "/config/enumerations/65", "from": "BADVALUE", "to": "GOODVALUE"}

I get the following error as a result:  
BadRequest
{"error":{"db_error":["Database integrity constraint conflict: Java::JavaSql::SQLSyntaxErrorException: Unknown column 'system_mtime' in 'field list'"]}}

Matt

----
Matt Adair

Archivist for Digital Imaging and Infrastructure

Bentley Historical Library
1150 Beal Avenue
Ann Arbor, Michigan 48109-2113
734-647-3537

Valerie Addonizio

unread,
Nov 19, 2025, 11:14:59 AM (14 days ago) Nov 19
to Matthew Adair, Archivesspace_Users_Group

Matt,

 

This caught my eye as a weird one. I think you’ve uncovered a bug. Here’s my theory:

 

The backend/app/model/enumeration.rb tries to update the system_mtime as part of the merge:

 

https://github.com/archivesspace/archivesspace/blob/v4.1.1/backend/app/model/enumeration.rb#L64

https://github.com/archivesspace/archivesspace/blob/v4.1.1/backend/app/model/enumeration.rb#L69

 

But the rights_restriction_type table (which references that enumeration) does not have that column (I checked). If I’m right, the solution is either to add that column to that table, or, the code would have to first check whether that column exists before trying to update it, with some graceful logic if not.

 

-Valerie

--
You received this message because you are subscribed to the Google Groups "Archivesspace_Users_Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Archivesspace_User...@lyrasislists.org.
To view this discussion visit https://groups.google.com/a/lyrasislists.org/d/msgid/Archivesspace_Users_Group/CA%2BTambdkhYri3wAxX7Em2thus_HS2XjH205K3-tFqTDYQEnZTw%40mail.gmail.com.

Valerie Addonizio

unread,
Nov 19, 2025, 11:29:11 AM (14 days ago) Nov 19
to Valerie Addonizio, Matthew Adair, Archivesspace_Users_Group

Matthew Adair

unread,
Nov 19, 2025, 1:27:20 PM (14 days ago) Nov 19
to Valerie Addonizio, Archivesspace_Users_Group
Thanks Valerie - I think you are on the right track. I have a local sandbox instance, so for kicks, added sytem_mtime, user_mtime, and create_time fields to it. That took care of the initial problem. The next error is

{"error":{"db_error":["Database integrity constraint conflict: Java::JavaSql::SQLSyntaxErrorException: Unknown column 'local_access_restriction_type_id' in 'where clause'"]}}

So, I'm off to JIRA to submit a ticket.

Matt

----
Matt Adair

Archivist for Digital Imaging and Infrastructure

Bentley Historical Library
1150 Beal Avenue
Ann Arbor, Michigan 48109-2113
734-647-3537

Reply all
Reply to author
Forward
0 new messages