Menu

How can i change UserRequest status names ?

2014-11-06
2014-11-06
  • Fotios Kossyvas

    Fotios Kossyvas - 2014-11-06

    I've made an extension for adding and renaming the enumvalues of the status
    field of the class like this :

    <class id="user-content-UserRequest" _delta="must_exist">
    <fields>
    <field id="user-content-status" xsi:type="AttributeEnum" _delta="redefine">
    <always_load_in_tables>true</always_load_in_tables>
    <values>
    <value>inserted</value>
    <value>rejected</value>
    <value>open</value>
    <value>approved</value>
    <value>cancelled</value>
    <value>requirements</value>
    <value>development</value>
    <value>beta_test</value>
    <value>user_test</value>
    <value>closed</value>
    <value>suspended</value>
    </values>
    <sql>status</sql>
    <default_value>inserted</default_value>
    <is_null_allowed>false</is_null_allowed>
    </field></fields></class>

    ...

    after installing the extension i tried the toolkit Data Model Consistency
    and i had these errors :

    Class UserRequest

    Attribute 'status' (object state) has an allowed value (beta_test) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (cancelled) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (development) which
    is not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (open) which is not
    a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (requirements) which
    is not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (suspended) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (user_test) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (new) which is not an allowed
    value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (escalated_tto) which is not
    an allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (assigned) which is not an
    allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (escalated_ttr) which is not
    an allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (waiting_for_approval) which
    is not an allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (pending) which is not an
    allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (resolved) which is not an
    allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr,
    waiting_for_approval, approved, rejected, pending, resolved, closed,
    inserted')]
    , or reconsider the list of states)

    I have verified that the ALTERing in the db it's ok, table named
    "ticket_request" has now the type of field status as enum
    ('approved','beta_test','cancelled','closed','development','inserted','open','rejected','requirements','suspended','user_test')
    i cannot understand why i have these errors.
    I have tried to change (using this extension) the status to the "Incident"
    class too but now i have just doubled the errors as showed from toolkit
    Data Model Consistency :

    Class Incident

    Attribute 'status' (object state) has an allowed value (approved) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (beta_test) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (cancelled) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (development) which
    is not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (inserted) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (open) which is not
    a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (rejected) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (requirements) which
    is not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (suspended) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has an allowed value (user_test) which is
    not a known state (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (new) which is not an allowed
    value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (escalated_tto) which is not
    an allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (assigned) which is not an
    allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (escalated_ttr) which is not
    an allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (pending) which is not an
    allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)
    Attribute 'status' (object state) has a state (resolved) which is not an
    allowed value (You may define its allowed_values property as [new
    ValueSetEnum('new, escalated_tto, assigned, escalated_ttr, pending,
    resolved, closed')]
    , or reconsider the list of states)

    I saw that the definition made as "new ValueSetEnum('new, escalated_t..."
    is in the model.itop-request-mgmt-itil.php file which is autogenerated
    under env-production\itop-request-mgmt-itil so where could i make this kind
    of change ?

    Could anyone help me, please ?

     
  • Denis

    Denis - 2014-11-06

    You have also to update the definition of the various "states" under the <lifecycle> tag.</lifecycle>

     

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.