pwclient/xml-rpc: Returned patchid for hash is not the latest

Open
#41 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start at the pwclient/xml-rpc patch query and inspect how the Python SQL abstraction selects and orders patches. Confirm the returned patch is the latest by date, then verify that the acceptance hook updates the resubmitted patch rather than an earlier patchset.

Written by the indexing model from the issue text.

Description

enhancement

It looks like the hook to mark patches as accepted is closing the first instance of a patch. But quite often this is wrong because the patch is in a patchset was resubmitted. So the first patch (which was marked as "changes requested", "superseeded" or even "rejected") is accidentally marked as accepted and the actual patch (which is marked as "under review" or "new") still has the old state.

I would therefore propose as initial way to fix it to change the order of the patches in the query for patches and return the one with the "highest date". But I have no idea how this python sql abstraction works and how to add this change to get ordering to "date desc".

Dominant language
Python
Stars
317
Forks
91
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getpatchwork/patchwork

All issues in getpatchwork/patchwork

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.