Question for a query in HPSM

Hello,

I would like to merge 2 views in HPSM: I basically want to add the "Incidents assigned to me" view to my other query. Is there any option for an existing view to add to a syntax?

If I was not clear: 

(assignment#"MY_QUEUE") and flag#true and ((problem.status isin {"Open", "Pending customer", "Owner assigned"} and ((assignee.name = {})")))

This is basically a dispatch query, to that I want to add my tickets. All of them, but only the incidents.

What do you suggest?

Thank you very much in advance!

Tags:

  • Hi,

    What are you trying to achieve exactly?

    Can you please provide some more details.

     

    Thanks,

  • We have some different asignment groups in our workplace and for me it would be ideal if I could see

    1. all the incidents from one group (let's name Group A), except the "Pending customer" ones, AND
    2. all incidents assigned to my name from all my groups (Group B, Group C)

    in the same view / query.

    For the 1st option I already have a query, it works fine (which I mentioned above), and for the 2nd I also have one but I cannot see the query definition so I cannot merge these 2 views.

    What I tried was:

    ((assignment#"Group A") and flag#true and ((problem.status isin {"Open", "Pending customer", "Owner assigned"} and ((assignee.name = {}))) or problem.status isin {"Pending vendor - SLO Suspended", "Work in progress"})) or ((assignment#"Group B" or assignment#"Group C") and (problem.status isin {"Pending customer"} and ((assignee.name = {MY_NAME}))))

    (Green is the 1st query which actually works alone, blue is what I tried as Incidents assigned to me.)

  • For your second query I think you need this (it's what we use):

    (flag=true) and assignee.name=operator()

    You don't really need to spell out the groups.

    And the compound query would be:

    ((assignment#"Group A") and flag#true and ((problem.status isin {"Open", "Pending customer", "Owner assigned"} and ((assignee.name = {}))) or problem.status isin {"Pending vendor - SLO Suspended", "Work in progress"})) or ((flag=true) and assignee.name=operator())

  • Your question is a little vague, but you should be able to copy the parts of View Query 1 which you want and combine them with the parts of View Query 2 which you want.

    To be honest, the easiest way might be to just do a new search on incidents with the query being exactly what you want, then save that as a view.

  • Remember that 'or' queries could potentially do full table searches.  Start your new query like this:

    flag=true and (condition1 or condition2)

    Then you at least limit the or query to active tickets.

    You should also avoid # (starts with) and use = (equal).

    flag=true and (assignee.name=$lo.user.name or (assignment="MY_QUEUE" and (not (problem.status isin {"Pending customer"}))))