Hi,

I am relatively new to jenkins. I am trying to use 'Extended Choice 
parameters' to display a list of values for the second parameter, depending 
upon first parameter value.

Example: The date values to be displayed depend on the month you have 
choosen.

First Valiable: MONTH 
Range: 1..12

Groovy Script for second variable:
-------------------------------------------------
MONTH=binding.variables.get('MONTH')

if ((MONTH == 1) || (MONTH == 3) || (MONTH == 7) ||(MONTH == 8)|| (MONTH == 
10))
{
   return 1..31
}
else if (MONTH == 2)
{
  return 1..28
}
else
{
  return 1..30
} 

Result: Always 1..30, i.e. the else condition irrespective of what value is 
set for first parameter. Can anyone suggest how to get it right?
Also is there a way to debug it?

Thanks in advance!

Milan


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/68400c1d-37fb-4cd4-9b9f-2f6fe2a92be4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to