Menu

How to create custom status

2023-03-20
2023-08-23
  • Nikola Milanov

    Nikola Milanov - 2023-03-20

    Hi,
    Can I create custom status in iTop?
    The reason I need it is to create a trigger for this new status to notify some people/groups for particular ticket.

    Cheers,
    Nikola

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-03-20

    By status, do you mean something like "in production"/"obsolete"; or "assigned", "pending", "resolved"?

     
  • Nikola Milanov

    Nikola Milanov - 2023-03-20

    Status for request/incident.
    I'll try to explain what I'm trying to achieve:
    Assigned tickets to a team can be view only about members of this team, let's call it A and one Admin team.
    When ticket can not be Resolve by the team A I want this team to set the ticket to some status (new one) and then I create trigger for this status to notify the Admin team, that team A can't resolve this ticket, so Admin team to assign it to another team.
    I don't know if I could explain myself.

     
  • Boleyno

    Boleyno - 2023-03-29

    Hi,

    Can you be more precise please ? I'm in the same situation. I'm trying to create some different status according to a new lifecycle. But I dont' understand how the status is changing automatically.

    I checked in the data model.itop-ticket.xml and data model.itop-request-mgmt.xml about the pending status (for an example) , but I don't saw the piece of code that automatically changes the status.

    I have the error "the action failed", when I want to change the status from assigned to "my new status".

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-03-29

    What point do you mean, automatically? After a certain amount of time or ...?

     
    • Boleyno

      Boleyno - 2023-03-30

      Hi,

      Exemple :
      My ticket is assigned, the status is "assigned" on my ticket.
      When I change the state to "pending", using the simulus ev_pending , the status on my ticket change to "pending".
      I create a new state 'test' and a stimulus 'ev_test' that can be called when the ticket is "assigned". I'm searching to change the status (assigned -> test) when the stimulus is called. But i don't understand how to do that and how it work for the other state of the lifecycle.

       
      • Jeffrey Bostoen

        Jeffrey Bostoen - 2023-03-30

        Might be best to share your XML.

         
        👍
        1
  • Boleyno

    Boleyno - 2023-08-04
    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.6">
       <classes>
          <class id="UserRequest" _delta="must_exist">
             <properties>
                <style>
                   <icon>images/user-request.svg</icon>
                   <main_color>$ibo-color-blue-800</main_color>
                </style>
             </properties>
             <fields>
                <field id="status" xsi:type="AttributeEnum" _delta="must_exist">
                   <values>
                      <value id="test" _delta="define">
                         <code>test</code>
                         <style>
                            <main_color>#DECFB9</main_color>
                            <complementary_color>#FFFFFF</complementary_color>
                            <decoration_classes>fas fa-hourglass-half</decoration_classes>
                         </style>
                      </value>
                   </values>
                </field>
             </fields>
             <!--LIFE CYCLE-->
             <lifecycle>
                <stimuli>
                   <!--<stimulus id="ev_attente_externe" xsi:type="StimulusUserAction" _delta="define"/>
              <stimulus id="ev_reouverture" xsi:type="StimulusUserAction" _delta="define"/-->
                   <stimulus id="ev_test" xsi:type="StimulusUserAction" _delta="define" />
                </stimuli>
                <states>
                   <state id="test" _delta="define">
                      <inherit_flags_from>assigned</inherit_flags_from>
                      <flags>
                         <attribute id="agent_id">
                            <mandatory />
                            <must_prompt />
                            <read_only />
                         </attribute>
                         <attribute id="status">
                            <must_change />
                         </attribute>
                      </flags>
                      <transitions>
                         <transition id="ev_test" _delta="define">
                            <target>assigned</target>
                            <!--ev_attente_externe-->
                            <actions>
                               <action>
                                  <verb>SetCurrentDate</verb>
                                  <params>
                                     <param xsi:type="attcode">assignment_date</param>
                                  </params>
                               </action>
                            </actions>
                         </transition>
                      </transitions>
                   </state>
                   <state id="assigned" _delta="must_exist">
                      <transitions>
                         <transition id="ev_test" _delta="define">
                            <target>test</target>
                            <!--ev_attente_externe-->
                            <actions>
                               <action>
                                  <verb>SetCurrentDate</verb>
                                  <params>
                                     <param xsi:type="attcode">assignment_date</param>
                                  </params>
                               </action>
                            </actions>
                         </transition>
                      </transitions>
                   </state>
                </states>
             </lifecycle>
          </class>
       </classes>
    </itop_design>
    
     

    Last edit: Boleyno 2023-08-04
  • Boleyno

    Boleyno - 2023-08-04

    I do have my "test" which appears when my ticket is in the assigned status, but when I click on it, then select an action to perform (for example: change the assignment date), but then at the top of my screen I see "Action failed" and the ticket status doesn't change.

     
  • Boleyno

    Boleyno - 2023-08-10

    Hello , I repeat my question !
    Thank you :) !

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2023-08-10

    For both the state test as well as the state assigned, you seem to have the same transition target?

     
    • Boleyno

      Boleyno - 2023-08-10

      Which status should I enter in the new (test) that I'm creating?
      Which status should I target?

      What I want to achieve is:
      - Create a new status: test
      - Use a transition (accessible while the status is assigned) to change the ticket from assign to: test.
      - When this change is made, the ticket update date changes.

       

      Last edit: Boleyno 2023-08-10
      • Jeffrey Bostoen

        Jeffrey Bostoen - 2023-08-10

        https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Axml_reference#lifecycle - expand the documentation for classes / class / states / state / transitions / transition.

        Under your assigned, the transition id ev_test should likely point to the target "test". This seems correct then. However, the transition under the state "test" seems to be referring to the transition id of the state you can go to when you are in "test". In your example, you would be going back to assign? But the transition ID doesn't seem to make sense.

        "Identifier must be the stimulus id used to trigger that transition, then provide the target state and the actions to perform." If you go back from test to assigned, it should probably be ev_assign. Not sure if that's what's causing your issue, or something else.

         

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.