idno_sort misses to index when allow_extra_elements=1

edited November 18 in General Support

Hi. When allow_extra_elements is set to 1 in multipart_id_numbering definition,

i.e.

obj_building = {

separator = .,

elements = {

type = {

type = CONSTANT,

value = MVB,

width = 3,

editable =0,

description = _(Sigla)

},

progressive = {

type = NUMERIC,

width = 10,

minimum_value=1,

allow_extra_elements = 1,

description = _(Progressivo),

editable = 1

}

}

},

the extra elements are not added to idno_sort field.

I.e., taking shown definition:

idno MVB.801.3 become in idno_sort              MVB.                801,

and also idno MVB.801.2 become in idno_sort                 MVB.                801

loosing this way the correct ordering.

How to fix this?

Thanks,

GB

Comments

  • I have a fix for this in the develop branch (1.8). Note that you can't use allow_extra_elements with numeric elements and have it sort correctly as the entire element is cast to an integer, removing anything after the ".". You should change it to a "FREE" element to ensure things are retained as entered.

  • There's also a 1.7 fix for this in the "master" branch, which will make it into the next 1.7 release.

Sign In or Register to comment.