Auto fill an Asset field in a Ticket submitted by a user on the owner side
Hi Guys.
So...when a ticket is created by the user, the "Machine" field
is set to the users "Fleet Number" automatically.
This is because on the user side the box for "Filter on submitter assigned devices" is checked.
So the user doesn't have to worry about searching for their machine in the list before submitting a ticket.
Now on the owner side, when the ticket is received we have an "asset field".... (which is owner only and hidden from the user) ,
and should be populated with the corresponding asset for the "machine".
These entries are basically the same....one being a device and the other being an asset.
My issue is, on the owner side, the asset also has a box.... "Filter on submitter assigned asset", which I cant seem to get to stay checked.
This way it make life easier for the owners to not have to search for the corresponding asset of the submitter, before closing a ticket.
The asset is a required field, and the ticket won't close until it is populated.
I can't seem to the save the option for the box "Filter on submitter assigned asset" to be checked on the ticket owner side,
This makes closing several tickets at once impossible, as this is a "required field" and would therefore
need each individual ticket to get the field populated before it can be closed.
Thank all
Answers (1)
You could set the asset field automatically using a custom ticket rule. Your select statement would be something like:
SELECT ID FROM HD_TICKET WHERE ASSET_ID = 0 and MACHINE_ID != 0
That will always set the asset to the machine, so make sure you want that to happen for all tickets in the queue.
The update statement would then be something like this:
UPDATE HD_TICKET
SET ASSET_ID = (SELECT ID FROM ASSET WHERE ASSET_TYPE_ID = 5 and MAPPED_ID = MACHINE_ID)
WHERE ID in (<HD_TICKET_IDS>)
Set the rule to run on save and you should be good to go.
Standard Caveat: Custom ticket rules are not supported by Quest and have the potential to break your appliance. Tread carefully, test and make sure you have working backups.