Roundup Tracker - Issues

Message5566

Author schlatterbeck
Recipients Amy, jpend, richard, rouilj, schlatterbeck
Date 2016-05-10.12:24:52
Message-id <1462883093.87.0.194546103919.issue1444214@psf.upfronthosting.co.za>
In-reply-to
I have implemented this some time ago:
In the schema-definition of links or multilinks to something that can
have numeric names, you define the option "try_id_parsing='no'".
This will change the parsing algorithm whenever numbers are entered in
fields for this Link/Multilink. The default for this attribute is "yes"
to preserve the standard behaviour. When set to "no", numbers will not
be interpreted as object ids.

Now we might argue that this is sub-optimal because it really should be
a parameter of the roundup item, not the link/multilink to it.

And there should be some more documentation on this.

But this is in production for some time now and works as expected.

Example schema definition:

    customer_agreement = Class \
        ( db
        , ''"customer_agreement"
        , customer         = Link      ("customer")
        , product          = Link      ("product", try_id_parsing='no')
        , description      = String    ()
        )
    customer_agreement.setlabelprop ("customer")
    customer_agreement.setorderprop ("description")

Another note: When parsing link values as IDs the traceback documented
in the attachment is not the major problem. The main problem is when
this works and an item exists in the database with the given ID: In that
case the item with the ID is linked, not the item with the (numeric)
name. Which -- in most cases -- is not what the user expects.
History
Date User Action Args
2016-05-10 12:24:53schlatterbecksetmessageid: <1462883093.87.0.194546103919.issue1444214@psf.upfronthosting.co.za>
2016-05-10 12:24:53schlatterbecksetrecipients: + schlatterbeck, richard, rouilj, jpend, Amy
2016-05-10 12:24:53schlatterbecklinkissue1444214 messages
2016-05-10 12:24:52schlatterbeckcreate