undefined method 'collect'#772

Subscribe to undefined method 'collect' 3 post(s), 2 voice(s)

 
Avatar Adrian Wible 32 post(s) #2037

build 2_0_1, rev 9053

I this error message:

Error in data-series-chart macro: undefined method `collect’ for :required:Symbol

from the following chart:

{{ data-series-chart conditions: ‘Type’ = ‘Story’ AND ‘Iteration’ = ‘Iteration 1’ x-labels-start: ‘2008-07-13’ x-labels-end: ‘2008-08-11’ x-labels-step: 1 x-title: ‘Iteration Day’ y-title: ‘Points’ data-point-symbol: diamond data-labels: true cumulative: true chart-height: 500 chart-width: 800 plot-height: 375 plot-width: 500 series: -label: Total Scope color: black type: line data: SELECT ‘Added to Scope On’, SUM – label: Development Complete color: green type: line trend: true data: SELECT ‘Development Completed On’, SUM – label: QA Complete color: orange type: line trend: true data: SELECT ‘QA Completed On’, SUM
}}

When I take out the first line in the chart – i.e. delete the following lines

-label: Total Scope
color: black
type: line
data: SELECT 'Added to Scope On', SUM('Planning Estimate')

I get a different error message:

Error in data-series-chart macro: Property name and aggregate must be specified in the series data parameter: @@ Help
 
Avatar Adrian Wible 32 post(s) #2039

OK, I figured out what my problem was and got it to work – my indentation was off. It appears that the parameters for each line must be indented. That is, instead of this:

- label: Total Scope
color: black
type: line
data: SELECT ‘Added to Scope On’, SUM

It must look like this:

- label: Total Scope color: black type: line data: SELECT ‘Added to Scope On’, SUM

So several issues flow here:

1) If the indentation is truly necessary, the examples in the help files should be modified to illustrate the indentation. (I copied from the help text to get myself started, and there is no indentation in the help file examples).

2) It would be helpful to describe the indentation requirements in the help files – particularly for the charts.

3) The Ruby error message (undefined method ‘collect’) should be caught and filtered.

Thanks.

 
Avatar Suzie Prince Administrator 180 post(s) #2134

Adrian

Thanks for this detailed post and sorry for the delay in responding. We are aware that in certain scenarios there are some unhelpful errors when using the macros and this is something we are planning to rectify soon. As you pointed out the indentations are required and it is also our intention to update the help text to ensure it works when copied and pasted in.

You may be aware that there are some wiki tool bar buttons to help create charts in Mingle and these should input the macros correctly. Although they are not as detailed as the examples in the help text these should help provide the correct indentation.

Thanks again, Suzie