I have created a process in service desk for new hires. I have also created a new queues that are going to different ticket owners.  I guess that is besides the point.  My question is this: Can you create a rule that will stop a ticket in the process before it even creates a ticket number?

For example:  HR chooses No on a custom field if a person doesn't need a business card. There is a ticket somewhere in the process that doesn't need to be created because of this choice.  Can I get this ticket be skipped in the process?

Would I only be able to do this through a custom ticket rule that is set off because of this that closes it after the ticket is opened?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1
There is no logic in a ticket process. You can create a ticket rule to automatically close the ticket AFTER it was created but that's about it.
Answered 08/11/2015 by: h2opolo25
Red Belt

Please log in to comment
1
As stated in the other answer, there is no logic that can be used within the process flow, however how about this as an option. Firstly maybe don't use the process. Second set the tick boxes so that the options can be selected by your HR resource, then create a rule that looks to see if the box is ticked and it then sends an email to the queue to create a new template ticket for the work associated with the tick box. The rule logic can be such that if there is no tick, there is no email and as such no new ticket.

You can also lock this down by using a hidden switch field to ensure that each rule is only run once and prevents too many tickets being logged.
Answered 08/11/2015 by: Hobbsy
Red Belt

  • Thanks for your answer. The original way that I planned it out was without a process. I could heavily rely on ticket rules to create tickets. This may work better for what I would need.

    I will bring this idea up to see what my team thinks. It doesn't sound to difficult
  • However, how would that work if I want to have a parent/child relationship like how processes work?
  • This is a topic I am very interested in. The inability to have some parts of a process be optional is currently the main roadblock for implementing a new hire process. I believe I asked on these forums how others achieve this goal, but was met with a chorus of cricket chirps. (http://www.itninja.com/question/process-ticket-with-optional-child-tickets)

    It sounds to me as though you are suggesting having a Kace rule which queries for the selection of a checkbox, and then opens a ticket by sending an email. In my experience, Kace does not allow a ticket to send an email to open a ticket. (see http://www.itninja.com/question/email-to-service-desk-from-rule-does-not-create-a-ticket, for one) I tried a similar approach for setting child tickets based on a rule, and it did not work for this reason.

    Is it now possible to have a ticket rule send an email to create a ticket? If so, how is this magic done?
    • MichaelMc,

      I have been able to get it to work, but this is how I have done it. First, I have 2 rules created. The first rule is to set the queue email in question to the CC_List. The second rule sends the email for the CC_List and then removes the email from the CC_List. I know it sounds like a hodge podge way to work, but it works beautifully.

      I have also created a child ticket based on a rule on a below post. If you want, I can post my select statements for the rules.
      • I'm not sure I understand. Do you mean you are sending email from one queue to a different queue? This was an idea I mentioned in the other thread.
        Does this have to be a CC? In other words, If queue1 sends an email directly to queue2, it doesn't open a ticket, but if queue2 is on the CC list it does?

        I've said it before, if the software solves it's problems with a kludge fix, it doesn't fix the problem. It just forces users to build kludge solutions to do what they actually want.
      • I believe that you can have it in the SUBMITTER_EMAIL, CC_LIST, or OWNER_EMAIL. I just chose the CC_LIST because I don't really use it for anything else.

        I guess I shouldn't call it a kludge, because I am using the ticket rules and I'm not exactly sure if there is a best practices list for it. I just know that it works for what I am trying to do.
      • For some reason, I can't reply to your reply.... but anyway:
        You missed answering the most important of the questions I asked (sorry if I wasn't clear about this). Is this being achieved by a queue sending an email to itself (Q1 emails Q1) or by a different Q sending the email (Q2 emails Q1)?
      • Sadly, from what I have tried, I cannot get it to work where the queue emails itself. It works all the time when the queue emails another one, but not when it emails itself.
      • Thanks!
        What I mean by this being a kludge fix is that not allowing the queue to email itself is meant to prevent mail loops and infinite tickets (such as if the queue sends a ticket has been opened notification to itself, etc.). This is a kludge, rather than an actual fix, because there are legitimate uses for having the queue email itself such as what you are doing here. And infinite ticket loops haven't been prevented at all, you just need 2 queues to create them.
Please log in to comment
0
Hobbsy,

I took your answer and I've been trying out some things to get the parent/child relationship a chance.  Since all of the information travels down to the new ticket via email, I have no issues having the data all look the same.   The only problem I'm having is the SQL error that I am getting in my update statement below:

SELECT STATEMENT
-----------------------------------------------------------------------------
select  HD_TICKET.ID as PARENT_ID,
HD_TICKET.TITLE as PARENT_TITLE,
        HD_TICKET.CUSTOM_FIELD_VALUE0 as PARENT_NAME,
        HD_TICKET.IS_PARENT as IS_PARENT,
        CHILD.ID as CHILD_ID,
        CHILD.TITLE as CHILD_TITLE,
        CHILD.CUSTOM_FIELD_VALUE0 as CHILD_NAME,
        CHILD.PARENT_ID as CHILD_PARENT
from HD_TICKET CHILD,HD_TICKET
where CHILD.CUSTOM_FIELD_VALUE0 = HD_TICKET.CUSTOM_FIELD_VALUE0
and HD_TICKET.IS_PARENT=1
and CHILD.IS_PARENT=0
----------------------------------------------------
UPDATE STATEMENT
----------------------------------------------------
UPDATE HD_TICKET CHILD, HD_TICKET
SET CHILD.PARENT_ID=HD_TICKET.ID
WHERE CHILD.CUSTOM_FIELD_VALUE0=HD_TICKET.CUSTOM_FIELD_VALUE0
AND CHILD.HD_QUEUE_ID=5
AND CHILD.ID in (<TICKET_IDS>)
-----------------------------------------------------

Here is the error when I try running it

-----------------------------------------------------
08/11/2015 15:01:56> Starting: 08/11/2015 15:01:56 08/11/2015 15:01:56> Executing Select Query... 08/11/2015 15:01:56> selected 1 rows 08/11/2015 15:01:56> Executing Update Query... 08/11/2015 15:01:56> mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 5] in EXECUTE("UPDATE HD_TICKET CHILD, HD_TICKET SET CHILD.PARENT_ID=HD_TICKET.ID WHERE CHILD.CUSTOM_FIELD_VALUE0=HD_TICKET.CUSTOM_FIELD_VALUE0 AND CHILD.HD_QUEUE_ID=5 AND CHILD.ID in ()") 08/11/2015 15:01:56> Ending: 08/11/2015 15:01:56
--------------------------------------

It seems as if something is wrong with the (<TICKET_IDS>) portion of the query.  Anyone else see anything that could be causing it?
Answered 08/11/2015 by: zgillette
Second Degree Blue Belt

  • From what I've experienced you need to have the update ticket be called HD_TICKET. If you give it a name (like Child) it doesn't work. Change this around to have the child be HD_TICKET and name the parent instead and see if that works.
    • Thanks for replying h2opolo25. The query below seems to work, but needs to be run on a 15 minute basis and not a "on Ticket Save" basis.

      Select Query
      -------------------------------------------------
      select HD_TICKET.ID as PARENT_ID,
      HD_TICKET.TITLE as PARENT_TITLE,
      HD_TICKET.CUSTOM_FIELD_VALUE0 as PARENT_NAME,
      HD_TICKET.IS_PARENT as IS_PARENT,
      CHILD.ID as CHILD_ID,
      CHILD.TITLE as CHILD_TITLE,
      CHILD.CUSTOM_FIELD_VALUE0 as CHILD_NAME,
      CHILD.PARENT_ID as CHILD_PARENT
      from HD_TICKET CHILD,HD_TICKET
      where CHILD.CUSTOM_FIELD_VALUE0 = HD_TICKET.CUSTOM_FIELD_VALUE0
      and HD_TICKET.IS_PARENT=1
      and CHILD.IS_PARENT=0
      -------------------------------------------------
      Update Query
      -------------------------------------------------
      UPDATE HD_TICKET CHILD, HD_TICKET
      SET CHILD.PARENT_ID = HD_TICKET.ID
      WHERE CHILD.CUSTOM_FIELD_VALUE0=HD_TICKET.CUSTOM_FIELD_VALUE0
      AND CHILD.IS_PARENT=0
      AND HD_TICKET.HD_QUEUE_ID=3
      --------------------------------------------------

      This seems to work well
Please log in to comment
Answer this question or Comment on this question for clarity