Menu

All Open Request

Kawthar
2022-10-13
2023-11-02
  • Kawthar

    Kawthar - 2022-10-13

    How Can I hide All open request from support agent?

    Ex: I want the all open request display the request that dispatched from another team only ( means the request that this team is responsible for) NOT all request for all teams

    I don't want team A to see requests for team B ,but I want team B to be able to request the services from team A and viseversa

     
  • Youssef Gadelrab

    Did you find a solution? im trying to do the same

     
  • Guillaume Lajarige

    Hello Kawthar and Youssef,

    If you want to change the "All opened requests" menu entry so it displays requests dispatched to the team of the current user instead of the requests assigned to the current user, you will need to:
    - Make you own iTop module to alter the default datamodel, see tutorial here
    - Alter the /itop_design/menus/menu[@id="UserRequest:MyRequests"]/oql node to changed the query to what you want
    - Deploy your iTop module in the /extensions folder of your iTop
    - Run the iTop setup and select your module

    Hope this helps,
    Guillaume

     
    👎
    1
  • Youssef Gadelrab

    what would the OQL be for that?
    SELECT UserRequest FROM UserRequest AS UserRequest JOIN Team AS Team ON UserRequest.team_id = Team.id JOIN lnkPersonToTeam AS L ON L.team_id = Team.id WHERE ((L.person_id = 2) AND (UserRequest.status NOT IN ('resolved', 'closed')))

    i tried this but i dont want the person id = 2 i want it to get the current user opening the menu and run it on that basis, tried a few other generic things but they dont work instead they wait for me to assign a value like "this-> id " and prompts me to assign value in the OQL tester

     
  • Guillaume Lajarige

    It's almost that yet, you have to use the :current_contact_id placeholder instead of the hardcoded ID:

    SELECT UserRequest FROM UserRequest AS UserRequest JOIN Team AS Team ON UserRequest.team_id = Team.id JOIN lnkPersonToTeam AS L ON L.team_id = Team.id WHERE L.person_id = :current_contact_id AND UserRequest.status NOT IN ('resolved', 'closed')
    
     

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.