Class RequestRunUiDecorator

java.lang.Object
hudson.util.AlternativeUiTextProvider
io.jenkins.plugins.batchcontrol.action.RequestRunUiDecorator
All Implemented Interfaces:
ExtensionPoint

@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class RequestRunUiDecorator extends AlternativeUiTextProvider
Relabels core's "Build Now" sidebar entry on approval-protected jobs (SPEC item 6: the manual build entry point must not read "Build Now" while run control is on).

Both message keys are handled because Freestyle uses AbstractProject.BUILD_NOW_TEXT while Pipeline (and other ParameterizedJobs) uses ParameterizedJobMixIn.BUILD_NOW_TEXT (POC-RESULTS assumption D). Core's BUILD_WITH_PARAMETERS_TEXT needs no separate handling: when no provider answers it, core falls back to BUILD_NOW_TEXT, which is this one.

U-02. This label used to be "Request Run" — the same words JobRequestAction puts on the sidebar — so a controlled job showed two identical entries going to different places, and the core one is the wrong one: its href is /job/<name>/build?delay=0sec, so following it reaches the queue without an approved marker and is refused (e2e-01 UX-1 recorded it as a dead end that looks like the right button). Core's entry cannot be hidden or re-pointed from a plugin — its href and its it.buildable/Item/Build rendering condition are core's — so the two are told apart by their labels instead: exactly one sidebar entry now reads "Request Run" and it is the one that opens the request form, while this one says what it is and that it needs approval first.