You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handling Missing Classifier IDs in PredictTicketClassificationService
Description
Currently, an external service is used in the internal logic to predict the ticket classifier identifier. Here’s the relevant code from apps/condo/domains/ticket/schema/PredictTicketClassificationService.js:
The external service is expected to take an array of string ticket descriptions as input and return an array of classifier IDs as output. However, there are cases where the ticket description may not match any classifier.
Current Behavior
If the id is missing in the response from the external service, the Ticket is not created.
This can lead to data loss since unmatched tickets are effectively discarded.
Expected Behavior
In cases where the external service cannot predict a TicketClassifier ID:
Either the Ticket should be created without a classifier.
Or a default classifier should be assigned.
This ensures that no ticket data is lost, even if the classifier cannot be determined.
Suggested Solution
Update the logic to handle cases where the id is missing or invalid:
If the predicted id is null or no TicketClassifier is found:
Either save the Ticket without a classifier.
Or assign a predefined default classifier ID.
Additional Context
This change will help prevent the loss of valuable data and provide a fallback for unmatched tickets. Let me know if additional details are needed!
The text was updated successfully, but these errors were encountered:
Thank you for the question. It seems like a logical change. If the prediction identifier is not returned, we can create a ticket without it. Could you please create a PR?
Handling Missing Classifier IDs in PredictTicketClassificationService
Description
Currently, an external service is used in the internal logic to predict the ticket classifier identifier. Here’s the relevant code from
apps/condo/domains/ticket/schema/PredictTicketClassificationService.js
:The external service is expected to take an array of string ticket descriptions as input and return an array of classifier IDs as output. However, there are cases where the ticket description may not match any classifier.
Current Behavior
id
is missing in the response from the external service, theTicket
is not created.Expected Behavior
In cases where the external service cannot predict a
TicketClassifier
ID:Ticket
should be created without a classifier.This ensures that no ticket data is lost, even if the classifier cannot be determined.
Suggested Solution
id
is missing or invalid:id
isnull
or noTicketClassifier
is found:Ticket
without a classifier.Additional Context
This change will help prevent the loss of valuable data and provide a fallback for unmatched tickets. Let me know if additional details are needed!
The text was updated successfully, but these errors were encountered: