ModuleIteration now returns correct iterations for a custom first iteration.
Previously, ModuleIteration always returned the custom first iteration on every call to getIteration(). We now only do so for the very first iteration.
This commit is contained in:
@@ -66,6 +66,10 @@ public class Iteration {
|
||||
return next.equals(iteration);
|
||||
}
|
||||
|
||||
public boolean isInitialIteration() {
|
||||
return this.equals(M1);
|
||||
}
|
||||
|
||||
public int getBugfixValue() {
|
||||
return name.startsWith("SR") ? Integer.parseInt(name.substring(2)) : 0;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,8 @@ public class ModuleIteration implements IterationVersion {
|
||||
* @see org.springframework.data.release.model.IterationVersion#getIteration()
|
||||
*/
|
||||
public Iteration getIteration() {
|
||||
return module.hasCustomFirstIteration() ? module.getCustomFirstIteration() : this.iteration;
|
||||
return this.iteration.isInitialIteration() && this.module.hasCustomFirstIteration() ? module
|
||||
.getCustomFirstIteration() : this.iteration;
|
||||
}
|
||||
|
||||
public String getJiraVersionName() {
|
||||
|
||||
Reference in New Issue
Block a user