getpatchwork / patchwork

Patchwork is a web-based patch tracking system designed to facilitate the contribution and management of contributions to an open-source project.
http://jk.ozlabs.org/projects/patchwork/
GNU General Public License v2.0
273 stars 82 forks source link

[Issue #506] Allow linking between series #587

Open andrepapoti opened 5 months ago

andrepapoti commented 5 months ago

Description

Allow linking between two series. A new field called related_series was added to the Series model where you can reference other Series. This feature is can be used to link different versions of the same Series to easily build a version history. The linking of a Series is bidirectional so if you link A to B automatically B is linked to A. For this feature a new API endpoint was created so the API version was bumped to v1.4.

Related

Closes #506

stephenfin commented 5 months ago

Also, we probably want to expose events for this? However, we should be careful not to avoid the pitfall encountered in related patches, namely that we returned the related_patches attribute as it was, despite that fact this would change over time as patches were added/removed.

andrepapoti commented 5 months ago

@stephenfin updated the API to follow your suggestion.

My initial idea was to not require the user to just send the new values instead of appending them to the previous related_series in the request's body, but considering that the Patch already follows the format you suggested it and it's not an issue for the clients to get the current related_series of a Series