/build/static/layout/Breadcrumb_cap_w.png

Automatically changing asset statuses

Hello,

Contracts have an end date and Licenses can also have an expiry date. Is there a way in KACE to automatically change the status of a contract or license to Expired once the end date/expiry date has passed?

- Richard


0 Comments   [ + ] Show comments

Answers (1)

Posted by: Hobbsy 1 month ago
Red Belt
1

You would have to create a ticket rule to change the status. It should be quite straightforward if it is just a single asset type such as a License, if the expiry date is in the asset field, just set the SELECT statement to select an asset record (id) when the asset type is license and the expiry date is less than “now”.

Then set the asset status id field to the expired asset status I’d and schedule the rule to run once a day.


If you use the maintenance expiry date in the licenses Asset type, then your rule should look something like this

Select Statement

SELECT ASSET.ID,

       ASSET.ASSET_DATA_ID,

       ASSET_DATA_7.ID,

       ASSET_DATA_7.FIELD_7,

       ASSET.ASSET_STATUS_ID

FROM ASSET    ASSET

     INNER JOIN ASSET_DATA_7 ASSET_DATA_7

        ON (ASSET.ASSET_DATA_ID = ASSET_DATA_7.ID)

WHERE

     ASSET.ASSET_STATUS_ID = '493' AND ((date(ASSET_DATA_7.FIELD_7) < curdate() ))

Update Statement

UPDATE ASSET

INNER JOIN ASSET_DATA_7 ASSET_DATA_7

        ON (ASSET.ASSET_DATA_ID = ASSET_DATA_7.ID)

SET

ASSET.ASSET_STATUS_ID = "492"

WHERE ASSET.ASSET_STATUS_ID = '493' AND ((date(ASSET_DATA_7.FIELD_7) < curdate() ))

Set the rule to run every day at a set time and you should be good to go


Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ