internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.22k stars 1.37k forks source link

Re-importing an existing book places a msg on the earliest history item instead of the 'import existing book' entry #1381

Open hornc opened 6 years ago

hornc commented 6 years ago

Initial record created, from an amazon.com record. is appearing on the first edit on a book's history footer, when it really should be associated with the re-import change.

Example: https://openlibrary.org/books/OL26354767M/How_to_Be_a_Stoic

tfmorris commented 5 years ago

That example doesn't appear to match the problem description. It looks like the original record was created by a user, not from an Amazon record, unless the edit history is wrong. The only thing the latest edit appears to have changed was to add an Amazon ID as a source record, even though no other metadata was changed, making it not really a source for anything.

I suggest that source records not be added unless they are actually the source for something. I also suggest that if a source is used, it be linked in the edit history comment so that one can click through to it (for both MARC and Amazon records).

Of course, we should get this all sorted out before doing any bulk imports, so it's a blocker for those.

hornc commented 5 years ago

I don't believe this is a blocker, it's just a UI display issue affecting the History template, which is misleading. The underlying metadata stored on the item is correct, and the specific history diffs at every stage are correct.

I believe https://openlibrary.org/books/OL26354767M/How_to_Be_a_Stoic is a valid example of the problem as the history template summary states: "Created by  | Inital record created, from an amazon.com record."

but the Amazon.com record was only added very recently, by the last edit https://openlibrary.org/books/OL26354767M/How_to_Be_a_Stoic?b=4&a=3&_compare=Compare&m=diff

The "Initial record created" msg is added by the template which assumes the presence of a source means it was initially created from it, which is not the case here as source_records can be added later. source_records is a list, which suggests that multiple metadata sources can contribute to one OL record. I'd treat the no-other current change edit as a confirming source, and gives us the potential to verify or obtain more data later if we we need to.

jdlrobson commented 5 years ago

Not sure I understand this one as not seeing any mention of amazon here:

Screenshot 2019-08-10 at 10 17 02 AM

xayhewalo commented 4 years ago

@hornc WIll importbot changes affect/fix this?

hornc commented 2 years ago

The history also appears different depending on whether a user is logged in or not. To see the incorrect overwirtten history you have to be logged in.