internetarchive / internetarchive/openlibrary

List entries lost when works are merged

Open
#10,735 4 comments 0 reactions 0 assignees View on GitHub
Lead: @cdrini Priority: 2 Theme: Lists Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

### Problem

When two works are merged, lists on which a "losing" work are listed don't have the "winning" work added to them (ie the list entries for the works aren't merged).

You can see the pre-merge lists here: https://openlibrary.org/works/OL7858736W?v=7
while the merged work has no lists: https://openlibrary.org/works/OL7858733W

### Reproducing the bug

1. Go to ...
2. Do ...

* Expected behavior: The merged work is listed on all lists that any of the works which were merge were listed on
* Actual behavior:

### Context

- Browser (Chrome, Safari, Firefox, etc): N/A
- OS (Windows, Mac, etc): N/A
- Logged in (Y/N): Y
- Environment (prod, dev, local): prod

### Breakdown

#### Requirements Checklist
* [ ]

#### Related files

*

#### Stakeholders

*


#### Instructions for Contributors

- Please [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date **before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) to work on this issue and **each time after** pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the pre-merge work at https://openlibrary.org/works/OL7858736W?v=7 with the merged work at https://openlibrary.org/works/OL7858733W, then trace the merge workflow and how list memberships are stored. Done means the winning work appears on every list that included either work, with coverage for the merge case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.