Jul 4, 202211:37 AM - edited Jul 4, 202211:38 AM
Participant
Service Hub Tickets - Priority Field not working
Need some help regarding the Ticket-Listing module I tried to add the priority ticket line but when viewing the page it only display 1 priority name e.g Priority 1 instead the other tickets are Priority 2 the loop might be the wrong ?
Here's the screenshot
And here's the code of that table at the top
{% set user = request_contact.contact %} {% set contact_id = user.hs_object_id %} {% set company_id = request_contact.company.hs_object_id %}
<!-- Determine the appropriate search criteria based on the logged in Contact's "portal_role" value. --> {% set company_or_contact_id = user.portal_role == "Super Admin" ? company_id : contact_id %} {% set association_type_id = user.portal_role == "Super Admin" ? 25 : 15 %}
<!-- Retrieve the appropriate Tickets based on the above values. --> {% set associated_tickets = crm_associations(company_or_contact_id, 'HUBSPOT_DEFINED', association_type_id,'limit=100&order=-createdate','subject, content, ticket_priority, hs_pipeline_stage, createdate, hs_lastmodifieddate, closed_date, hs_ticket_id, source_type', false) %}
<!-- Store the results in a variable. --> {% set ticket_array = associated_tickets.results %}
{# The id on the table is used for screenreaders/keyboard users to skip directly to the table's data on page load #} <table class="cp-ticket-list tableticketLISTINGnew22" id="cpTicketList"> <caption></caption> <thead> <tr> <th scope="col">{{ i18n_getmessage('tableHeader.id') }}</th> <th scope="col">{{ i18n_getmessage('tableHeader.subject') }}</th> <th scope="col">{{ i18n_getmessage('tableHeader.lastActivity') }}</th> <th scope="col">Priority</th> <th scope="col">{{ i18n_getmessage('tableHeader.status') }}</th> <th scope="col">{{ i18n_getmessage('tableHeader.created') }}</th>
Thanks for getting in touch! Generally speaking it's not often that Community members would get the time to troubleshoot somebody's code, you might find the Developer Slack Community a better place to start. If you have a Paid HubSpot Subscription and believe there might be something wrong with some HubSpot code, our Support channels can certainly help you there.
I'll tag in some Community members with more expertise in this area who might be able to see the issue. @Teun, @Kevin-C, @miljkovicmisa any thoughts?