Menu ā–¾ ā–“

AttributeBoolean

schirrms
2022-02-24
2022-04-11
  • schirrms

    schirrms - 2022-02-24

    Hi,

    Today, I just needed a simple 'Yes/No' field. It would be possible to do that with an 'AttributeEnum', but this seems a littel overkilling.

    I was surprised that, according to the documentation, an AttributeBoolean doesn't exist in the iTop Datamodel.

    But internally, iTop has another opinion : in fact, the AttributeBoolean does exists (and create in the database a tinyint).

    I found that the display is quite 'exotic', as iTop write 'Yes' for 1 and No for 0 (that's OK), but, while Editing, you have to put 1 or 0, yes and no are incorrect value.

    In fact, I thought of a simple checkbox, but checboxes are maybe not available (yet ;)) in iTop. But no problem, I can live with that (as, in my case, this field will 99% be updated by a synchronization)

    The question is: as this attribute is undocumented, can it become deprecated or removed in iTop ?

    Thanks,

    Pascal

     
    šŸ‘
    1
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-02-24

    Is it not used anywhere, not even for internal purposes?

     
  • Guillaume Lajarige

    Hello guys,

    Yes the attribute already exists for quite some time, but its implementation is so wrong that we don't document it. It has been used only in a couple extensions, but you should avoid it. As Pascal described, the edition of such a field is a non sense as of current implementation... šŸ˜•

    So to answer the question, yes it might be removed at any time, do not use it. šŸ˜•

    Cheers,
    Guillaume

     
    • schirrms

      schirrms - 2022-02-24

      Hi Guillaume,

      Thanks for your fast answer, so an AttributeEnum it will be.

      For the long term, I still think that a (complete) AttributeBoolean would be a good idea :)

      Thanks,

      Pascal

       
      • Guillaume Lajarige

        For the long term, I still think that a (complete) AttributeBoolean would be a good idea :)

        Hell yeah! It would be great for both UI and programming.

        Guillaume

         
  • Pierre Goiffon

    Pierre Goiffon - 2022-02-24

    Hello,

    This was asked by few other iTop users... I was almost sure that this was already referenced, but I wasn't able to find it.
    I recall that the workaround was using an enum...

    Do you have precise use case in mind Pascal ?

     
    • schirrms

      schirrms - 2022-02-24

      Hi Pierre,

      Yes, indeed, I have a precise use case :)

      I was again extended the VMware to iTop sync (I'm way over 1000 lines of changes for now, and it will probably continues to grow...) Today, I just discovered that, in iTop, Templates were seen as classical VMs (Well, technically, that's correct).
      I found out how to retrieve the 'Template status' of a VM, and I just wanted a boolean (idealy a checkbox, but the aspect is not my main concern.).

      As a VM can just be a template or not, that would be a boolean. I finally did it with an Enum Field, but this is a little 'too much'.

      Thanks,

      Pascal

       
      • Pierre Goiffon

        Pierre Goiffon - 2022-04-11

        Thanks Pascal, and sorry for the late response.
        I've added an enhancement request in Combodo's internal DB : N°5063

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.