PR Processor bot now sets Fixed in version releases on cherry picks

Hello everyone,

First a bit of background. In Redmine we have a few fields for every issue. The most interesting to us now is Fixed in releases so let me explain how it’s used. (You may find Redmine "Fixed in" and "Target Version" but that’s outdated by now.)

To indicate to users and developers where a fixed is supposed to be delivered, the Foreman project uses this field. It’s multi valued so it can contain 3.1.0, 3.0.1. This indicates it was merged for 3.1.0 but there’s a cherry pick to 3.0.1. For users it’s now clear that when Foreman 3.0.1 is released and they upgrade, the bug should be resolved.

We also have some bookmarks to verify all fixed are in. For example, 3.0.1 release TODO - Foreman verifies that all issues where Target version is set to 3.0.1 also have Fixed in releases set tot 3.0.1.

For a while this field has been set automatically for our development versions, but not for stable versions. After noticing that this was sometimes forgotten (which makes the TODO less useful), I decided to automate this.

It’s been successfully tested on one massive PR (https://github.com/theforeman/foreman/pull/8842):

INFO:prprocessor:Setting fixed in version for issue 33505 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33597 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33502 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33501 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33507 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33490 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33504 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33503 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33491 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 29481 to 3.0.1
INFO:prprocessor:Setting fixed in version for issue 33617 to 3.0.1

If you run into problems or if I’ve introduced a regression elsewhere, please let me know.

4 Likes

Great work! Thanks, I always struggle to set it manually, so this is a great help :slight_smile:

Awesome addition, sometimes its challenging to track what has been fixed where while doing the release duties.