want to add a dropdown for users to select ticket type after clicking new ticket .
so that i can manage the count of issue occurred for different type of ticket.
is it possible to customize ? if yes plz let me know the steps for it.
thanks
want to add a dropdown for users to select ticket type after clicking new ticket .
so that i can manage the count of issue occurred for different type of ticket.
is it possible to customize ? if yes plz let me know the steps for it.
thanks
@seetamN I think here is what you can do.
In TicketNew.vue in template section, add an AutoComplete field.
<div class="m-5">
<Autocomplete
v-model="ticketType"
placeholder="Ticket Type"
label="Ticket Type"
:options="ticketTypeStore.dropdown"
/>
</div>
Everything below goes in ticket setup.
Import the useTicketTypeStore
in script setup.
import { useTicketTypeStore } from "@/stores/ticketType";
Create ticketType ref to hold the value.
const ticketType = ref("");
Modify creatResource to include ticket type.
const ticket = createResource({
url: "helpdesk.helpdesk.doctype.hd_ticket.api.new",
debounce: 300,
makeParams: () => ({
doc: {
description: description.value,
subject: subject.value,
ticket_type: ticketType.value,
template: props.templateId,
...templateFields,
},
attachments: attachments.value,
}),
Create ticketTypeStore object.
const ticketTypeStore = useTicketTypeStore();
That should do. A gist would have helped you integrate this better, but let me know if you are stuck. I could probably raise a PR if mods think it is useful or if there is a better way to do it, we will know anyways in the discussion.
First, create a custom field in the HD ticket doctype via customize form and then go to HD Ticket Template and add fields in the ticket template to show in the portal.