Page 1 of 1

ev3: bad index for RenderBusinessCapabilityColumn

Posted: 25 Jul 2012, 12:23
by jmk
String value of business_capability_index are used when sorting capabilities in the following files:

Code: Select all

business/core_bl_bus_cap_model.xsl
enterprise/core_el_programme_summary.xsl
enterprise/core_el_project_summary.xsl
It would be better to coerce this value to number. For example replace

Code: Select all

<xsl:sort select="own_slot_value[slot_reference='business_capability_index']/value" />
by

Code: Select all

<xsl:sort select="number(own_slot_value[slot_reference='business_capability_index']/value)" />

Re: ev3: bad index for RenderBusinessCapabilityColumn

Posted: 25 Jul 2012, 16:11
by jonathan.carter
Thanks for this.

Just to make sure. Are you getting an error - the "bad index" error with the current approach?

Re: ev3: bad index for RenderBusinessCapabilityColumn

Posted: 26 Jul 2012, 10:42
by jmk
Just to make sure. Are you getting an error - the "bad index" error with the current approach?
I have no error. Sorry for the wording, what I meant was that capabilities are lexicography ordered instead of numerically. This is a problem when you have more than 9 caps.

Moreover, as the "business_capability_index" slot has an integer type I think it is better to use number() instead of the string value for the sort.

Re: ev3: bad index for RenderBusinessCapabilityColumn

Posted: 26 Jul 2012, 16:06
by jonathan.carter
Indeed!

Thanks for clarifying. I've added this to our bug list.

Jonathan

Re: ev3: bad index for RenderBusinessCapabilityColumn

Posted: 13 Mar 2013, 10:00
by rungsima
I found this problem in Business Reference Model view (core_bl_bus_cap_model.xsl) and resolved by adding data-type="number" in xsl:sort:

<xsl:sort select="own_slot_value[slot_reference='business_capability_index']/value" data-type="number" />

Re: ev3: bad index for RenderBusinessCapabilityColumn

Posted: 17 Mar 2013, 18:14
by jonathan.carter
Thanks for posting this error.

We've just released some updated versions of this and some associated views in the Version 4 release but we'll check whether this is still an issue.

Jonathan