:: Version 2.6.0 ::

Portal: How to change visible Tickets

In this How to, we will modify the list of Tickets that a user can see in the portal.

name:
How to change scope
type:
How To
audience:
Administrator, Integrator, Developer
level:
Advanced
duration:
30min
keyword:
Portal, Customization
iTop version:
2.3.0

Prerequisites

What you will need to:

  • Have an iTop system with the demo data and the enhanced portal installed,
  • Have access to an account with enough rights to connect to the portal (usually this means having the Portal User profile),
  • Have a way to modify the datamodel definition (creating an extension or with ITSM Designer)

Aim of this tutorial

In this tutorial, you will learn how to:

  • Modify a scope to change what users are able to view/modify in the Portal

Example of Ticket Scope

Default existing Ticket scopes:

Portal
<module_design id="itop-portal">
  <classes>
    <class id="Ticket">
      <scopes>
        <scope id="all">
          <oql_view><![CDATA[
          SELECT Ticket AS T WHERE T.caller_id = :current_contact_id 
          AND T.finalclass IN ('UserRequest', 'Incident')]]></oql_view>
          <oql_edit><![CDATA[SELECT Ticket AS T]]></oql_edit>
        </scope>
        <scope id="portal-power-user">
          <oql_view><![CDATA[
          SELECT Ticket AS T WHERE T.org_id = :current_contact->org_id 
          AND T.finalclass IN ('UserRequest', 'Incident')]]></oql_view>
          <oql_edit><![CDATA[SELECT Ticket AS T]]></oql_edit>
          <allowed_profiles>
            <allowed_profile id="Portal power user"/>
          </allowed_profiles>
        </scope>
      </scopes>

New Ticket scope to add to the above or to replace the “all” scope. It allows any portal user to see in the Portal, tickets they would be linked as contact.

Portal
<module_design id="itop-portal">
  <classes>
    <class id="Ticket" _delta="must_exist">
      <scopes>
        <scope id="all-in-contacts" _delta="define">
          <oql_view><![CDATA[
          SELECT Ticket AS T 
          JOIN lnkContactToTicket AS l ON l.ticket_id = T.id 
          WHERE l.contact_id = :current_contact_id 
          AND T.finalclass IN ('UserRequest', 'Incident')]]></oql_view>
        </scope>
      </...>
2_6_0/customization/portal_howto_change_scope.txt · Last modified: 2019/01/09 16:40 (external edit)
Back to top
Contact us