Unlike the bug I originally reproduced, in which the parent had some builds
but the context in which the new build was scheduled omits a parent,
this seems to be due to a case in which there is no build record at all for the parent.
No idea how that could happen (getLastBuild should return even a running, failed, or aborted build),
but @treydock reports a stack trace in 1.509.2 which implies this.
So fixing null safety; will not prevent an exception but will report it more gracefully.
Going back in browser history can reset configuration form to the *previous* state,
not what was just saved! (In the case of lazily inserted form elements.)
Thus clicking Save from that page would actually revert your recent changes.
For now, just omitting the button; could make it go back to index or configuration pages,
but there are already links for this.
Go only up to 6 build into the past for calculating the estimated duration.
Also take failed builds into account, if we don't find any successful ones.
The earlier fix by @ssogabe broke the test. This fix corrects the
problem properly.
The reason this error happens with some plugins is that if there's an
input field whose name is "on", then even after prototype.js extends
an element object, "form.on" will refer to the input element, not the
prototype.js function to add an event handler.
- Fixes a regression in core where the display name clear on copy was triggering a save
- More than one way to do this, could also have used the marker interface approach
This route seems slightly less fragile, though people could still add ItemListeners
with order == -Double.MAX_VALUE which would then introduce intdeterminism.
A marker interface would remove that indeterminism as the onCopyComplete method would
be only called on the Job as the last method... but it could be hard to
ensure that all ItemGroupMixin's respect the calling of onCopyComplete contract
hence this approach seems better to me for that reason
Use DescribableList to handle the copy-on-write semantics correctly. The vector class just doesn't cut it, and we've been setting a new value to this field, which will violates all sorts of the concurrent programming practice.
This change has the nice side effect of removing {{class="vector"}} from the persisted XML. A test is added to make sure we can still read back such an XML.