Merge authors - undo bugs on production

Bug #551306 reported by George
38
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Open Library
Fix Released
Medium
Anand Chitipothu

Bug Description

Here's a spec for version 1.

Requirements:
* We need a way to merge duplicate Author records
* "Master" is the best record we have to represent the Author
* Merges must result in redirects from any merged Author records into the Master
* Merges must be noted in record histories, both in the merged author records (pointing to the Master), and in the Master (perhaps note URLs or IDs to all merged author records)
* All Works must shift to Master Author
* All Subjects must shift to Master Author (discard dupes)
* Re-run Work Finder (?)
* The Merge Flow will not allow editing Author records (that can happen later)
* Merges can be undone
* Merged Author records should not be editable

UI:

1. Do author search

2. See link to merge -
http://home.us.archive.org/~georgeo/mocks/merge-link-on-author-search.png

2a. We could also add the Merge link to Search Results Authors facet

3. Go to merge UI, which displays all search results in a list - http://home.us.archive.org/~georgeo/upstream/merge-authors.html
- what should URL be? /authors/merge/?q=iris+murdoch ?

4. Merge UI
- Allow 2 lists: To Merge & Exclude from Merge
- A Master is required in To Merge list
- Default master should be author with most Works
- Items can be removed from the main merge list into Exclude from Merge and vice versa- Any item in the Merge list
- Place MERGE submit button between the two lists
- At least two authors are required for Merge to be submitted (validation: "You can't merge an author with itself. Please choose at least 2 authors to merge."
- Cancel takes you back to previous page

5. After you press Merge
- Show "Are You Sure? Y/N" alert
- Once merge goes through, load Master Author page, with all merged works/subjects etc on display (If this will take some time, we can consider a "Loading..." progress indicator, or a note to say something like "Thank you! This merge operation will take a few minutes to complete.)
- Update Author & Work indexes

? Questions ?
- Should we show some Works per author?
- Split/Undo merge UI - should we roll this out with Merge?
- Should merged author records be accessible via the API?

George (george-archive)
Changed in openlibrary:
assignee: nobody → Edward Betts (edwardbetts)
status: New → Confirmed
importance: Undecided → High
milestone: none → upstream-to-www
George (george-archive)
Changed in openlibrary:
status: Confirmed → In Progress
Revision history for this message
Edward Betts (edwardbetts) wrote :

I need LP#523316 fixed before I can implement this.

Revision history for this message
George (george-archive) wrote :

Another mock, this time using checkboxes as per Edward's original prototype: http://home.us.archive.org/~georgeo/upstream/merge-authors-checkboxes.html

Lance will lay this out today. Replaced subjects listing with top 4-5 works.

Edward's working version on Upstream is here: http://upstream.openlibrary.org/merge/authors?key=OL9388A&key=OL2622133A&key=OL2316098A&key=OL2837555A&key=OL3950097A&key=OL5478763A&key=OL1925683A&key=OL2415834A&key=OL2554104A&key=OL2748857A

George (george-archive)
Changed in openlibrary:
milestone: upstream-to-www → general-bucket
Revision history for this message
George (george-archive) wrote :

(Let's refrain from calling this done out loud for now - it's still a way away from spec.)

Revision history for this message
George (george-archive) wrote :

Important to see if we can collapse the (current) separate history entries into 1. (Perhaps we could start using Anand's suggested UI for reviewing all the bits of a save_many, and possibly even present an Undo when you're looking at the many.)

Revision history for this message
George (george-archive) wrote :

(From Brewster, via email)

there seems to be a limit of 20 authors on the merge authors page.
this is not enough. I suggest it be very large in this case, limited
say to 1000.

I can not do the right thing for thomas greco in this case:

http://upstream.openlibrary.org/search?q=thomas+greco

-brewster

Revision history for this message
George (george-archive) wrote :

(From Brewster, via email)

when I click on the master checkbox and the merge checkbox sometimes
they are locked together sometimes not-- all in all the ui is a bit
confusing on that front and the implementation is not consistent.

http://upstream.openlibrary.org/authors/merge?key=OL2963713A&key=OL3001957A&key=OL3704136A&key=OL6582464A

I realize it is not public yet, but could it go into a bug on launchpad?

-brewster

Revision history for this message
George (george-archive) wrote :

Comments on existing implementation:

- Master (author with most works) not selected by default)
- Work finder not being run
- Any other metadata in "slave" authors is being deleted - this would need a UI to address
- Ideally, after you press MERGE bytton, you would be taken to Master author's page, with a note that says "this will be done soon"
- Author merge should be bundled up into a Save Many

Revision history for this message
Edward Betts (edwardbetts) wrote :

Why do we need to select a master automatically?

Revision history for this message
Edward Betts (edwardbetts) wrote :

The author fields are: name, bio, birth date, death date, other names, links.

When we merge authors we copy the names of all the non-master records into the other names field of the master. We should also copy the other names field. We can concatenate all any descriptions in the bio field for each author and store it in the master bio field. We can do the same for links, copy all the links to the master author. We can refuse to merge if birth and death dates don't match, if somebody wants to merge authors with non-matching dates they can delete the bad dates before the merge.

Then we don't need a UI for merging data.

summary: - Merge Authors (spec)
+ Merge authors
Revision history for this message
George (george-archive) wrote : Re: Merge authors

Selecting the master automatically was just an idea, to try to make it explicit that you need to do it. If we generally feel that the master would most likely be the author record with the most records, selecting that by default means one less decision for the user.

Revision history for this message
George (george-archive) wrote :

Here's what we need to get settled before we can release Merge Authors to anyone that's logged in:

1. Links into the Merge UI (Lance)
2. Finalize UI on main merge page (Lance, Ariel, George)
3. Transition to save_many (Edward, Anand)
4. Revert/Undo (Lance, Ariel)

---

1. Links into the Merge UI (Lance)
- Author facet on search results (done)
- From Author Search result page
  - http://openlibrary.org/search/authors?q=larsson
  - http://home.us.archive.org/~georgeo/mocks/merge-link-on-author-search.png

2. Finalize UI on main merge page (Lance, Ariel, George)
- Flow needs to be slightly different
- Master should be selected by default (author with most works; potentially check for a birthdate, or # of edits)
  - We should select a default for the user. In my experience using the UI, it's only very rarely that I select something other than the top result as Master.
- Fix formatting/copy on the Are You Sure pop-up
- After you click "YES, MERGE" you should go to the Master Author's page, with a progress bar at the top (instead of the transaction occurring in the pop-up.)
http://home.us.archive.org/~georgeo/mocks/author-merge-progress.png

3. save_many (Edward, Anand)
- Change the transaction to use save_many
- Change the representation in History, to a single entry for the merge with an option to "expand" to see a list of every merge (as it is today)
  - One entry in the user's editing history, and recent changes list
  http://home.us.archive.org/~georgeo/mocks/authors-merge-history-save-many.png

4. Revert/Undo (Lance, Ariel)
http://home.us.archive.org/~georgeo/mocks/author-merge-history-view.png
- There should be two types of Revert: Batch (top right), and each item.
Clicking on the “revert” link next to an item in the history should italicize the row (perhaps with a yellow fading highlight). It should change to appear like a standard revert.
- Should link to this detailed view from Master author history:
http://home.us.archive.org/~georgeo/mocks/author-merge-master-history-note.png

Changed in openlibrary:
assignee: Edward Betts (edwardbetts) → nobody
Revision history for this message
George (george-archive) wrote :

Hi Anand - You said last Monday that this would be ready for release this Tuesday (August 3). Is that still the case? Please send along an update.

Changed in openlibrary:
assignee: nobody → Anand Chitipothu (anandology)
Revision history for this message
Anand Chitipothu (anandology) wrote :

I don't it will be ready for release by Tuesday. Couldn't do much last week as I was down for 3 days. I think it will be ready for testing by Tuesday.

Currently working on the new recentchanges pages and support to display comments with links etc. The bleeding edge is on my dev server.

http://anand.openlibrary.org/recentchanges/2010/07/23
http://anand.openlibrary.org/recentchanges/2010/06

Revision history for this message
Edward Betts (edwardbetts) wrote :

This is released. We still need to fix some bugs in the undo part.

George (george-archive)
Changed in openlibrary:
importance: High → Medium
summary: - Merge authors
+ Merge authors - undo bugs on production
Revision history for this message
Edward Betts (edwardbetts) wrote :

Are the bugs in author merge undo fixed, if not can we have some details?

Changed in openlibrary:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.