Menu

Dispatch Ticket to Team of different Organization - Portal

Userofuser
2021-12-08
2022-11-04
  • Userofuser

    Userofuser - 2021-12-08

    Hi There

    I'm trying to dispatch a ticket to a team of another organization through the portal.
    In the non-portal view this is working, but when I switch to portal-view and try to assign/re-assign ticket, I only see the teams of my own organization.

    Can someone help me with this?

    Thanks

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-12-09

    Hello,
    Take a look at your portal user scopes ?
    If you don't know what scopes are, take a look at this tutorial : Changing what can be seen on Portal [iTop Documentation]

     
  • Userofuser

    Userofuser - 2021-12-14

    Hi Pierre

    Thanks for the link.

    I tried to implent this with an extension.

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
      <module_design id="itop-portal" _delta="must_exist">
        <forms>
          <form id="ticket-create" _delta="must_exist">
            <properties _delta="define_if_not_exists">
              <always_show_submit _delta="force">true</always_show_submit>
            </properties>
          </form>
        </forms>
        <classes>
          <class id="Contact" _delta="must_exist">
            <scopes>
              <scope id="agents" _delta="define">
                <oql_view><![CDATA[SELECT Contact AS c 
                         JOIN lnkPersonToTeam AS l2 ON l2.person_id = c.id
                         JOIN Team AS t ON l2.team_id=t.id 
                         JOIN lnkDeliveryModelToContact AS l1 ON l1.contact_id=t.id 
                         JOIN DeliveryModel AS dm ON l1.deliverymodel_id=dm.id 
                         JOIN Organization AS o ON o.deliverymodel_id=dm.id 
                         WHERE o.id = :current_contact->org_id 
                         UNION SELECT Contact AS c 
                         JOIN lnkDeliveryModelToContact AS l1 ON l1.contact_id=c.id 
                         JOIN DeliveryModel AS dm ON l1.deliverymodel_id=dm.id 
                         JOIN Organization AS o ON o.deliverymodel_id=dm.id 
                         WHERE o.id = :current_contact->org_id]]></oql_view>
                <ignore_silos _delta="force">true</ignore_silos>
                <allowed_profiles>
                  <allowed_profile id="Support Agent"/>
                </allowed_profiles>
              </scope>
            </scopes>
          </class>
        </classes>
      </module_design>
      </itop_design>
    

    But I get this error:

    Error loading module "sample-portal-show-org": /itop_design/module_design[itop-portal] at line 3: could not be found - Loaded modules: dictionaries,core,application,approval-base,authent-cas,authent-external,authent-ldap,authent-local,combodo-autoclose-ticket,combodo-db-tools,combodo-email-synchro,itop-attachments,itop-backup,itop-config-mgmt
    
     

    Last edit: Userofuser 2021-12-14
  • Vincent @ Combodo

    Your extension is missing the module dependencies, it must be loaded after the module which brings the /itop_design/module_design[itop-portal] which you are trying to modify !

     
  • Userofuser

    Userofuser - 2022-01-05

    Hi Vincent

    I checked my dependecies and I think it's correct, or is there something missing?

    <?php
    //
    // iTop module definition file
    //
    
    SetupWebPage::AddModule(
        __FILE__, // Path to the current file, all other file names are relative to the directory containing this file
        'sample-portal-show-org/1.0.0',
        array(
            // Identification
            //
            'label' => 'Sample Portal - Show all Organization in Portal',
            'category' => 'business',
    
            // Setup
            //
            'dependencies' => array(
                'itop-portal/2.7.0'
            ),
            'mandatory' => false,
            'visible' => true,
    
            // Components
            //
            'datamodel' => array(
                'model.sample-portal-show-org.php'
            ),
            'webservice' => array(
    
            ),
            'data.struct' => array(
                // add your 'structure' definition XML files here,
            ),
            'data.sample' => array(
                // add your sample data XML files here,
            ),
    
            // Documentation
            //
            'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
            'doc.more_information' => '', // hyperlink to more information, if any 
    
            // Default settings
            //
            'settings' => array(
                // Module specific settings go here, if any
            ),
        )
    );
    ?>
    
     
  • Pierre

    Pierre - 2022-01-24

    Hi Userofuser,

    I have the exact same problem. Did you manage to solve this?

    Regards,
    Pierre R

     
  • Pierre Goiffon

    Pierre Goiffon - 2022-01-27

    Hello,

    The module dependencies are now :

            'dependencies' => array(
                'itop-portal/2.7.0'
            ),
    

    On compilation time you get the error :

    /itop_design/module_design[itop-portal] at line 3: could not be found
    

    This XML node is defined in itop-portal indeed.

    The error doesn't list itop-portal as a loaded module... Did you try with another version like itop-portal/1.0.0 ?

    Warning, you're overriding the Contact class also so you should add this dependency as well.

     

    Last edit: Pierre Goiffon 2022-01-27
  • Pham Hong Quan

    Pham Hong Quan - 2022-11-02

    Hello Pierre Goiffon,

    I got the same issue but relate to class instead of portal.

    ====

    Error loading module "add-acceptance-problem-extension": /itop_design/classes/class[Problem] at line 4: could not be found - Loaded modules: dictionaries,core,application,add-acceptance-problem-extension

    ===
    Could you please help to advise how to add dependencies?

    Thank in advance.
    Quan Pham.

     

    Last edit: Pham Hong Quan 2022-11-02
  • Pham Hong Quan

    Pham Hong Quan - 2022-11-02

    The error capture.

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-11-04

    See above, you'll likely need to add a dependency to itop-problem-mgmt

     

    Last edit: Jeffrey Bostoen 2022-11-04

Log in to post a comment.