On Sun, Nov 29, 2020 at 10:36 PM Michael Carter
<
[hidden email]> wrote:
> So Stapler.getCurrentRequest().findAncestorObject(Job.class); doesn't work inside the getDefaultParameterValue
No, because there is no HTTP request here. I do not think
`ParameterDefinition.getDefaultParameterValue` has any way of
determining which `Job` it is associated with (if indeed there is a
single unique answer).
Maybe you should revisit your design. Use a stock
`ParameterDefinition` type, but have a `RunListener` update its
default value after a build passes?
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3Xcn%3D-cZ4FWQz4pYu1Dc47G%2BGdE%2BG_87GDwXTDzNh_mQ%40mail.gmail.com.