Object numbers: sharing a serial between different object types

Hello,

For object number, I want to have a serial that continues across different object types, but with different prefixes for each type. For example:

ART.2022.12458

MUS.2022.12459

MUS.2022.12460

ART.2022.12461

ART.2022.12462

ART.2022.12463

MUS.2022.12464

But, I am not getting this to work.

When the last object was an art object, and the number allocated was

ART.2022.12458

if the next object is a of a different type (museum), a new sequence starts:

MUS.2022.1

As in the example above, what I am wanting to get instead is MUS.2022.12459

The multipart_id_numbering config I used is like this:

   art = {

      separator =.,

      elements = {

         prefix = {

            type = CONSTANT,

            value = ART,

            description = _(Prefix)

            },

         year = {

            type = YEAR,

            width = 4,

            description = _(Year),

            editable = 1

            },

         running_no = {

            type = SERIAL,

            description = _(Running-number),

            sequence_by_type = [art,museum]

             }

          }

      },      


   museum = {

       separator =.,

       elements = {

         prefix = {

            type = CONSTANT,

            value = MUS,

            description = _(Prefix)

            },

         year = {

            type = YEAR,

            width = 4,

            description = _(Year),

            editable = 1

            },

         running_no = {

            type = SERIAL,

            description = _(Running-number),

            sequence_by_type = [art,museum]

             }

          }

      },   


I am expecting sequence_by_type = [art,museum] to mean that the serial continues across the types. 

But, it looks like the different prefix is causing this to not work.

(As a test, I changed the prefix for objects of type 'museum' to ART, and the sequence continued as expected (but there is no point in that; it is just the same config for each type)).

If there is a different 'stub' (if that the right term?) before the serials (i.e. Prefix.Year), does that mean that the serials have to be different?

Is there a way that I am missing for getting this to work ?


With thanks,

Clifford.

Comments

  • Application version: 1.8

    Operating System: Debian GNU/Linux 11 (bullseye)

    Kernel: Linux 5.10.0-8-amd64

  • The numbering system uses the entire prefix to determine what the next-in-sequence number is. sequence_by_type will make the current number one more than the greatest number used by any of the specified types, but it still is looking for values based upon that prefix.

    There is currently no way to have a sequence of numbers across multiple prefixes. If this is critical to your work please create a GitHub issue for it and we'll see about adding such support soon.


    Seth

  • Hi Seth,

    Thank you.

    > The numbering system uses the entire prefix to determine what the next-in-sequence number is.

    Good to know that is how it works.

    Thanks for suggestion to add create a GitHub issue. I will discuss with the team here, and see how critical this one is for them.

    Probably have other numbering questions before long: will post new discussions.

    Again, thank you for your assistance.

    Clifford.

Sign In or Register to comment.