Attempting to merge user with shared address fails with nasty message

Bug #965374 reported by Michael Peters on 2012-03-26
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen 2.1
OpenSRF 2.0.1
PostgreSQL 9.1
Debian Squeeze

When a user attempts a patron merge, via the staff client, where one or more of the users has a shared *_address value, as a result of "cloning" at patron registration time, the merge will fail with a really nasty error (attached).

In reality, performing the actual SQL query generated by Evergreen, the fkey constraint on the shared address is apparent to someone with access to do that, but for the end user, they're left wondering why the merge failed.

In my opinion, this is a two parter:

#1 We need to **AT LEAST**tell the staff member why the merge failed, and tell them to contact whoever provides support
#2 Why not NULL out the *_address values for the subordinate user with the shared address, which will allow the merge to continue. This also will allow other users referencing those *_address values to retain their address(es).

Michael Peters (mrpeters) wrote :
Changed in evergreen:
status: New → Confirmed
importance: Undecided → Low (tji) wrote :

We recently encountered this issues twice on 2.4.

Rogan Hamby (rogan-hamby) wrote :

I'm still seeing this fail on 3.1 in the webclient except that no error message now. I went down a bit of a rabbit hole thinking of different scenarios in untangling users. So, I'm not putting a pull request on this:


As I'm not sure it's the approach we want. It does favor simplicity though as it assumes that if the patron is being merged out and deleted any other non-deleted patron could be the new target of address could now be the FK of actor.usr_address.usr. I think it's an improvement over the current behavior but will leave it to the community to discuss further.

tags: added: webstaffclient
removed: staffclient
tags: added: needsdiscussion
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers