Skip to main content
Matrix42 Self-Service Help Center

How to make Ticket Category field empty and mandatory for selection during creation

Overview

Many customers want to force their users to classify a ticket when creating it by selecting the correct category.
In default Product, the Category is always prefilled with the default one, and not every person creating a ticket changes Category to the correct one.

Goal

This article describes how a customer can achieve the above goal in UUX by doing a simple customization.

First Step

Go to Administration. 

Second Step

Find the Report Incident widget under User Interface > Layouts > Dialogs.

Third Step

Select it and click action "Customize".

When the Layout Designer opens, find the Category control and click on the "SPSActivityClassBase.Category" DataModel field in it. 

Apply the changes as shown in the image:

image.png

Code from image:

if(isNew.$value && v.defaultValue){
	v.defaultValue = null;
	return null;
}

if(qcCategory.$hasChanges){
	return  qcCategory.$value;
}

return $value;

Forth Step

After that you need to click Save and Publish.

As a result, the Category field is required and empty.

Additional Scenario: Hide specific category from selection

As an additional option, you may hide the parent category, such as "Service Desk", from selection by defining a filter expression for the Category control

filterExpression = "ID <> '41bd3d1e-da11-e611-d980-005056af22ed'"

where Guid is the ID of the Category you want to hide.

What's Next

How to make Ticket Category field empty and mandatory for selection during creation

  • Was this article helpful?