Implementation vs. Code documentation for enableManualTriggers

22 views
Skip to first unread message

Stephan

unread,
May 26, 2016, 3:04:42 AM5/26/16
to job-dsl-plugin
Hi all,

I just stumbled into the code & documentation for enableManualTriggers.  It says (copied from https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.views.DeliveryPipelineView.enableManualTriggers):

enableManualTriggers

enableManualTriggers(boolean value = true)
Show a button if a task is manual. Defaults to false.

This seems to be a bit inconsistent, and in particular it's not clear what way it should be. 
I suggest to either change the doc to "Defaults to true" (x)or adapt the implementation to "…boolen value = false".

My also happy to provide a pull request (or whatever the right way is, for this project), whoever I'd like to understand what's the right way first.

Cheers
Stephan

Victor Martinez

unread,
May 26, 2016, 7:30:15 AM5/26/16
to job-dsl-plugin
Hi,

It means the default argument value of enableManualTriggers is true
     enableManualTriggers() = enableManualTriggers(true)

if that configuration is not defined in the job definition then enableManualTriggers is false

Does it make sense? 

Cheers

Stephan

unread,
May 26, 2016, 7:44:10 AM5/26/16
to job-dsl-plugin
Ah, now I get it: The parameter to the method defaults to true, the return value of the method defaults to false.

Thanks for explaining!

Cheers
Stephan
Reply all
Reply to author
Forward
0 new messages