Ticket Rule - Sent Mail to 0 of 1
Am working on my first ticket rule based on this kb:
http://www.kace.com/support/kb/index.php?action=artikel&cat=8&id=613&artlang=en
I am attempting to implement the sending of an email to submitter.
- Frequency is on Ticket Save and rule is enabled.
- Select query is copied from above article and includes submitter_email
- "Send an email for each result row" is checked
--- Subject: [TICK:$ticknum] $title
--- Email Column: $submitter_email
--- Email Body: Test email.
I set up at new ticket with someone else as the submitter and I as the owner.
No email is sent and the Run Log shows:
18:55> Starting: Mon, 24 Jan 2011 12:18:55 -0500
18:55> Executing Select Query...
18:55> selected 1 rows
18:55> Sending ticket notifications...
18:55> sent mail to 0 of 1
18:55> Ending: Mon, 24 Jan 2011 12:18:55 -0500
It appears that the SQL's WHERE clause should find the ticket as a result of:
HD_TICKET_CHANGE.DESCRIPTION LIKE 'TICKET CREATED%'
What am I missing?
Thank you,
- Allen
http://www.kace.com/support/kb/index.php?action=artikel&cat=8&id=613&artlang=en
I am attempting to implement the sending of an email to submitter.
- Frequency is on Ticket Save and rule is enabled.
- Select query is copied from above article and includes submitter_email
- "Send an email for each result row" is checked
--- Subject: [TICK:$ticknum] $title
--- Email Column: $submitter_email
--- Email Body: Test email.
I set up at new ticket with someone else as the submitter and I as the owner.
No email is sent and the Run Log shows:
18:55> Starting: Mon, 24 Jan 2011 12:18:55 -0500
18:55> Executing Select Query...
18:55> selected 1 rows
18:55> Sending ticket notifications...
18:55> sent mail to 0 of 1
18:55> Ending: Mon, 24 Jan 2011 12:18:55 -0500
It appears that the SQL's WHERE clause should find the ticket as a result of:
HD_TICKET_CHANGE.DESCRIPTION LIKE 'TICKET CREATED%'
What am I missing?
Thank you,
- Allen
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
afzal
13 years ago
Posted by:
bostonbound
13 years ago
Thanks Afzal, alas I want to add more data to the email than what is available in the standard email temples.
I can successfully send an email and data when I choose "Send query results to someone".
The option "Send an email for each result row" is not sending an email, even if I hard-code an email address.
I can successfully send an email and data when I choose "Send query results to someone".
The option "Send an email for each result row" is not sending an email, even if I hard-code an email address.
Posted by:
bostonbound
13 years ago
OK, I think I understand the problem with my "Send an email for each result row" option.
#1 The "help" says that: "This rule assumes that the Select Query will return a column that will contain an email address, and that you want to send a mail to that address." Actually, it seems to require the email in the query as I am unable to hard-code an email address in the Email Column field. (I did try the trick of aliasing a hard-coded email address and that worked fine).
#2 The aliased field names in the kb articles use names such as OWNER_EMAIL, SUBMITTER_EMAIL, and CC_LIST. Now, when I use these fields and send the results of a query using a ticket rule, a column name such as OWNER_EMAIL is parsed and is displayed in the email to the recipient nicely as "Owner Email". I'm assuming the same parsing is happening to my aliased field name in the "Send an email for each result row" option. With OWNER_EMAIL, no email is sent. However, when that is changed to OWNEREMAIL, the email goes out.
Is there some undocumented magic going on with underscores in aliased field names? Is there an installation or other reason why this is happening or is this common knowledge that I have been unable to find thus far?
I admit that I really enjoy working with the product given its power and flexibility - but have found several hiccups such as this that are truly frustrating.
Cheers,
- Allen
#1 The "help" says that: "This rule assumes that the Select Query will return a column that will contain an email address, and that you want to send a mail to that address." Actually, it seems to require the email in the query as I am unable to hard-code an email address in the Email Column field. (I did try the trick of aliasing a hard-coded email address and that worked fine).
#2 The aliased field names in the kb articles use names such as OWNER_EMAIL, SUBMITTER_EMAIL, and CC_LIST. Now, when I use these fields and send the results of a query using a ticket rule, a column name such as OWNER_EMAIL is parsed and is displayed in the email to the recipient nicely as "Owner Email". I'm assuming the same parsing is happening to my aliased field name in the "Send an email for each result row" option. With OWNER_EMAIL, no email is sent. However, when that is changed to OWNEREMAIL, the email goes out.
Is there some undocumented magic going on with underscores in aliased field names? Is there an installation or other reason why this is happening or is this common knowledge that I have been unable to find thus far?
I admit that I really enjoy working with the product given its power and flexibility - but have found several hiccups such as this that are truly frustrating.
Cheers,
- Allen
Posted by:
afzal
13 years ago
Posted by:
GillySpy
13 years ago
The email for each row is addressed a column from the query . If the column (or it's alias instead if it has one)is OWNER_EMAIL then use that, if it's OWNEREMAIL then use that.
If you want to harcode an address then you have to do it in your query and send to that.
e.g.
email column: SUPPORT
If you want to harcode an address then you have to do it in your query and send to that.
e.g.
select ID, 'support@kace.com' SUPPORT from HD_TICKET WHERE 1=1
email column: SUPPORT
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.