RFR: 1350: Altfixversions isn't checking Backport resolution

Kevin Rushforth kcr at openjdk.java.net
Tue Feb 15 20:43:04 UTC 2022


On Tue, 15 Feb 2022 18:39:56 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> This patch fixes a flaw in the altfixversion feature. Currently a backport with an altfixversion is considered valid if the state is "resolved". There are two problems with this. It misses backports that are in state closed. It could also cause false positives by accepting backports that aren't set to resolution "Fixed".
> 
> To fix this, I've introduced a new method on the Issue interface "isFixed()". The default implementation (which will get used in testing) just delegates to isResolved(). For JiraIssue, it checks both the state and the resolution.

Looks good.

issuetracker/src/main/java/org/openjdk/skara/issuetracker/jira/JiraIssue.java line 190:

> 188:     @Override
> 189:     public boolean isFixed() {
> 190:         if (isResolved() || isClosed()) {

This test might not be needed -- the resolution will be empty or null for unresolved issues. I don't see any harm in leaving it if you prefer to have the extra check.

-------------

Marked as reviewed by kcr (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/1286


More information about the skara-dev mailing list