Menu

date field in portal and connection into the database

seemax1991
2015-04-02
2015-04-09
  • seemax1991

    seemax1991 - 2015-04-02

    Hello,

    sadly I do not know much about indepth-PHP.
    And as far as I understood I am unable to change the portal UR/I-ticket form by an extension.

    The only thing I want to do is add a field for the form User Request and Incident in the itop portal. The value entered is to be transfered to the backend in connection with the created Ticket.
    The field would be used as a 'wish'-field giving the user the opportunity to define a specific date up until he would like the request to be done or the issue fixed.

    There are not any other connections to that field, it simply has to be made visible in the portal and helpdesk management.

    Any idea where I could start with this?

     
  • seemax1991

    seemax1991 - 2015-04-08

    So with lots of time I were able to figure out how I would add this field to the CLASS:UserRequest, when using non-itil request-mgmt.
    I got no idea though, how to add this field to the portal overview.
    the index.php in enormously complex. IF I am able to find a solution to this, I will post it here, bur looking at my php-skills that will be very unlikely.

     
  • seemax1991

    seemax1991 - 2015-04-09

    To add a field to the NON-ITIL Request Management I did the following as extension:
    (Not gonna display module.xxxx dictionary and so one right now)
    I named it datamodel.add-request-wishdate.xml

    #!codestuff
    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
    <classes>
    <class id="UserRequest">
    <parent>Ticket</parent>
    <fields>
    <field id="tosolveuntil" xsi:type="AttributeDate" _delta="define">
    <always_load_in_tables>true</always_load_in_tables>
    <sql>tosolveuntil</sql>
    <default_value></default_value>
    <is_null_allowed>true</is_null_allowed>
    </field>
    </fields>
    <lifecycle>
    <states>
    <state id="new" _delta="merge">
    <flags>
    <attribute id="tosolveuntil" _delta="merge">
    <read_only/>
    </attribute>
    </flags>
    </state>
    </states>
    </lifecycle>
    <presentation>
    <details>
    <items>
    <item id="col:col2" _delta="merge">
    <rank>60</rank>
    <items>
    <item id="fieldset:Ticket:date" _delta="merge">
    <rank>30</rank>
    <items>
    <item id="tosolveuntil">
    <rank>90</rank>
    </item>
    </items>
    </item>
    </items>
    </item>
    </items>
    </details>
    <search>
    <items>
    <item id="tosolveuntil">
    <rank>250</rank>
    </item>
    </items>
    </search>
    <list>
    <items>
    <item id="tosolveuntil">
    <rank>70</rank>
    </item>
    </items>
    </list>
    </presentation>
    </class>
    </classes>
    <user_rights>
    <groups>
    </groups>
    </user_rights>
    </itop_design>
    

    After that I did edit the original datamodel.itop-request-mgmt.xml as I were unable to get the 'contents' stuff in the xml above, couldn't merge the CDATA-area.

    #!blabla
    <constant id="PORTAL_USERREQUEST_FORM_ATTRIBUTES" xsi:type="string" _delta="define"><![CDATA[title,description,impact,urgency,tosolveuntil]]></constant>
    

    After that the field is shown and useable in the portal
    B U T
    Out of some reason which I do not understand the entered date in that box ist not put into the ticket when using the portal.
    When I use the Helpdesk and create a new ticket over that area, it works fine.

     

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.