/build/static/layout/Breadcrumb_cap_w.png

Blog Posts tagged with KACE K1000 Service Desk

Ask a question

Ticket Rules, what's the one you find most useful?

The K1000 helpdesk module is impressive when it comes to the customization. The precanned ticket rules make sense if you choose to enable them. Post your favorite or most useful ticket rule here and why you like it.

View comments (4)

Problem with SLA Timer Custom Modified Field SOLVED

I have been following the series to create an SLA timer in the Kace Service Desk by GillySpy: http://www.itninja.com/blog/view/creating-true-sla-timers-in-the-kbox-helpdesk-part-1-what-you-really-want-from-your-data

I posted a fix for the rules posted so far not updating the columns and failing to run here: http://www.itninja.com/blog/view/update-to-sla-timer-ticket-rules-series

I was working on some other ticket rules and ran into an issue that required another fix. The SLA timer creates a custom modified field which it uses to continuously increment the timer and keep track fo the time. I discovered, however, that the default Modified column that comes with Kace out-of-the-box was being updated for every ticket in the HD_TICKET table when the increment rule runs every 15 minutes.

This means that any rule that is based on the default modified field will be affected. I have escalation rules, for example, that run daily and check to see if a ticket is in the status "New" and the modified field has not been changed in 10 days.

S.NAME = 'New' AND DATEDIFF(NOW(), HD_TICKET.MODIFIED) >= 10 AND DATEDIFF(NOW(), HD_TICKET.MODIFIED) < 11

The SLA Timer rule means that this escalation rule will never find a ticket because the modified field will never be older than 15 minutes.

In order to fix the rules in a way that will not depend on this modified column, I went in search of a column that was keeping track of changes and not affected by the SLA timer. Thanks to chucksteel for helping me locate the Timestamp field in the HD_TICKET_CHANGE table and put together the SQL for fixing these rules.

Here's the Join statement to include:

JOIN HD_TICKET_CHANGE LAST_CHANGE ON LAST_CHANGE.HD_TICKET_ID = HD_TICKET.ID
and LAST_CHANGE.ID=(select MAX(ID) from HD_TICKET_CHANGE where HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID)

and here's the previous query updated to use the Timestamp column from the HD_TICKET_CHANGE table:

S.NAME = 'New' AND DATEDIFF(NOW(), LAST_CHANGE.TIMESTAMP) >= 10 AND DATEDIFF(NOW(), LAST_CHANGE.TIMESTAMP) < 11

So, that's the fix for the problem. I still wonder whether the custom modified field is necessary for the SLA Timer or if there is a way to use the timer so that the default modified field does not get updated by the increment counter.

View comments (1)

Add KB Article Links to comments in tickets

I created this rule since I wanted a way to send the users a KB article that has HTML or markup in it. Currently the system would post the html code in a comment if using the KACE built in KB article lookup. So here's the steps I took to do this....

1. Go to the Service Desk Module > Configuration > Queues > "Specific Queue" > Queue Customization

2. Add a Single Select custom field with select value of query: select TITLE from ADVISORY and nothing in the default box.

3. Click Save and Continue

4. Edit the custom field in the Ticket Layout with the name KB Article Link and make it Owner Only - Hidden from User

5. Keep track of the custom field value. For example: CUSTOM_6 

6. Go to Service Desk Module > Configuration > Rules > "Specific Queue"

7. Click on Choose Action...  and choose New (SQL)

8. Name: KB Article Rule Insert. (Or whatever else you wanna call it)

Select Query:

select distinct(HD_TICKET.ID) from ADVISORY A, HD_TICKET

left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.ID = <CHANGE_ID>

where HD_TICKET.CUSTOM_FIELD_VALUE5 = A.TITLE   <--- Custom Field Number - 1 (CUSTOM_6 = CUSTOM_FIELD_VALUE5)

and HD_TICKET.HD_QUEUE_ID = 1   <--- INSERT QUEUE ID HERE

and HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID

Update Query:

update HD_TICKET, HD_TICKET_CHANGE, ADVISORY

set HD_TICKET_CHANGE.COMMENT = concat("http://KBOXURL/userui/advisory_detail?ID=", ADVISORY.ID),

HD_TICKET.CUSTOM_FIELD_VALUE5 = ''  <--- Custom Field Number - 1 (CUSTOM_6 = CUSTOM_FIELD_VALUE5)

where HD_TICKET.HD_QUEUE_ID = 1  <--- INSERT QUEUE ID HERE

and ADVISORY.TITLE = HD_TICKET.CUSTOM_FIELD_VALUE5   <--- Custom Field Number - 1 (CUSTOM_6 = CUSTOM_FIELD_VALUE5)

and HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID

and HD_TICKET_CHANGE.ID = <CHANGE_ID>

and HD_TICKET.ID in (<TICKET_IDS>)

Schedule: On Ticket Save


9. As an owner you can go to the drop down in the ticket detail view and select a KB article you want to send to the user. When you save the ticket it will add a comment with a link to the KB article.


If you need help getting the queue ID make sure you are using KBOXaddress/adminui and go to the queue settings. You will see at the top it will say something like: queue.php?ID=1 meaning that is queue #1

View comments (2)

Remove / Purge Kace LDAP Users

Here is simple piece of code to purge kace users not associated with tickets. This will maintain the historical ticket data and cleanup superfluous kace user accounts brought in from LDAP that aren't or are no longer being used. This was run as an adhoc ticket rule to cleanup the entries. I don't recommend letting it run automatically as it is a deletion statement and the way its written its *very* inefficient. It took about an hour to process about 5,000 users in our instance.

Before you even consider this, please run the daily backup task of the kbox. THEN pull the backups via FTP. Do NOT rely on downloading the backups via the web browser. I highly recommend scripting a regular backup pull via ftp. Once you have the newest possible backup files, make a copy of them and then consider if you would like to try the cleanup. 

Use at your own risk. 

select statement:

SELECT USER.*

 from USER

where (not exists(select 1 from HD_TICKET
where HD_TICKET.SUBMITTER_ID = USER.ID )) 
AND USER.USER_NAME != 'Admin'
AND USER.USER_NAME != 'R1' 

Update statement:

DELETE
USER.*

from USER

where (not exists(select 1 from HD_TICKET where HD_TICKET.SUBMITTER_ID = USER.ID )) 
AND USER.USER_NAME != 'Admin'
AND USER.USER_NAME != 'R1' 

After this runs, you can reimport LDAP users with your typical settings/schedule and will have effectively refreshed to the latest users in ldap at that time. 

To only import active LDAP entries, consider the following filter:

(&(mail=KBOX_USER)(sAMAccountType=805306368)(!(userAccountControl=514)))
View comments (1)

Ticket URI generated by helpdesk leads to ticket list not specific ticket

  • When clicking on the link generated by the helpdesk instead of being taken directly to the ticket after authentication takes place you are brought to the list of tickets. This does not occur if you already have KACE open and are authenticated to the K1, either through SSO or manual sign in.

    *This is new behaviour in this version and did not occur in 5.5

http://www.kace.com/support/resources/kb/solutiondetail?sol=136976
I was working a ticket with the KACE support team and this was the outcome. Posted here in case anyone was having the same issue.
View comments (1)
Showing 1 - 5 of 21 results

Top Contributors

Talk About kace reporting