ev3: bad index for RenderBusinessCapabilityColumn

Post Reply
jmk
Posts: 137
Joined: 31 May 2012, 12:08
Location: France

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)" />
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for this.

Just to make sure. Are you getting an error - the "bad index" error with the current approach?
Essential Project Team
jmk
Posts: 137
Joined: 31 May 2012, 12:08
Location: France

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.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Indeed!

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

Jonathan
Essential Project Team
rungsima
Posts: 10
Joined: 15 Dec 2009, 07:29

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" />
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

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
Essential Project Team
Post Reply