Relation links are broken when relating patches across different projects

Open
#360 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reproducing the PATCH request shown in the issue with patches from two projects, then trace how the related links are generated and serialized. Done means each cross-project relation links to the referenced patch in its own project and both links resolve without a 404.

Written by the indexing model from the issue text.

Description

bug

Eg.
I am trying to relate patch x in Project X to patch y in project Y.
ie method: PATCH url: /api/patch/x data: {'related': [y]}.
I can see the related link in both patches x and y.
But patch x has related link as: project/X/patch/y, similarly patch y has related link as project/Y/patch/x. Clearly both these links are broken as we are trying to reference a patch from a project it doesnt belong to and we get a 404.

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.