Menu

Add menu item in "Status" drop-down menu (CI)

2021-07-09
2021-11-18
  • Nikola Milanov

    Nikola Milanov - 2021-07-09

    Hi,
    I want to add some more in the CI Properties menu - "Status".
    Now there are 4 of them - implementation, obsolete, production, stock.
    I wan to to add something like "on repair", "on rent" ...
    Is there procedure to do that?

    Cheers

     
  • Andrew Precht

    Andrew Precht - 2021-08-24

    Thanks Vincent,
    Could you explain a bit more?
    For example, in the simplest terms, to add a Notes field to the Server class, First we add “notes” to the database with:

    <field id="user-content-notes" xsi:type="AttributeText" _delta="define">
    <sql>notes</sql>
    <default_value>
    <is_null_allowed>true</is_null_allowed>
    </default_value></field>

    Then we display it with:

    <item id="user-content-notes">
    <rank>40</rank>
    </item>

    What would this look like if we were adding a new “Status” option called: “on repair"

    Thanks

     
  • Tim McLeod

    Tim McLeod - 2021-09-21

    I would also like to do this. We need an additional option in CI status for "Pending Disposal".
    Clarification on this would be much appreciated.

     
  • Vincent @ Combodo

    Adding a value to a status when it is not used within a lifecycle is so simple that I have not created any tutorial for 3 lines of XML. See here the complete case for adding a status on a lifecycle and just use the first part "Declare a new state"

     
  • Andrew Precht

    Andrew Precht - 2021-10-29

    perfect, thank you Vincent.
    Looking at it now, it makes sense. Yes, simple...

     
    • Tim McLeod

      Tim McLeod - 2021-11-18

      Did you manage to work this out Andrew?
      I'm by no means a programmer and couldn't work out from Vincent's post what I should be entering and where. :(

       
      • Jeffrey Bostoen

        Jeffrey Bostoen - 2021-11-18

        Hi Tim

        Is this something you'd like to do yourself or have done for you? (in that case it's best to contact Combodo sales directly or a third party developer such as myself)

        Or do you actually want to accomplish this yourself; if so, how far did you get?

        I've created lots of customizations, but I don't think I have one publicly available where states are added.

         
  • Andrew Precht

    Andrew Precht - 2021-11-18

    Hi Tim,
    No, I have not had the chance to try it. (project is on hold for the moment)

    But, Thanks to Vincent’ reply “and just use the first part "Declare a new state"” I believe I understand.

    For me, step one was to complete this exercise, for an understanding on how to update/add to a class in iTop’. https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Aadd-attribute-sample

    Working off the example in that link, I would try adding the new status code right after the closing of the “Notes” definition. Something like this:

    <class id="user-content-Server" _delta="if_exists">
    <fields>
    <field id="user-content-notes" xsi:type="AttributeText" _delta="define">
    <sql>notes</sql>
    <default_value>
    <is_null_allowed>true</is_null_allowed>
    </default_value></field>
    <field id="user-content-status" _delta="must_exist">
    <values>
    <value id="user-content-New status here" _delta="define"">New status here</value>
    </values>
    </field>
    </fields>
    </class>

     

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.