Skip to content

Commit

Permalink
[FIX JENKINS-30899] Do not rely on Run.queueId for builds widget
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck authored and tfennelly committed Oct 15, 2015
1 parent 6aba76d commit 7410a59
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions core/src/main/java/jenkins/widgets/HistoryPageEntry.java
Expand Up @@ -59,14 +59,7 @@ protected static long getEntryId(@Nonnull Object entry) {
return ((Queue.Item) entry).getId();
} else if (entry instanceof Run) {
Run run = (Run) entry;
long queueId = run.getQueueId();
if (queueId == Run.QUEUE_ID_UNKNOWN) {
// Backward compatibility. This is a run from before the Queue.Item IDs
// were mapped onto their resulting Run instance.
return (Integer.MIN_VALUE + run.getNumber());
} else {
return queueId;
}
return (Integer.MIN_VALUE + run.getNumber());
} else {
return Run.QUEUE_ID_UNKNOWN;
}
Expand Down

0 comments on commit 7410a59

Please sign in to comment.