collabSupport/services/jiraPoller/ticketIcons.js
jmcqueen 9282e9cd0d Link Jira poller summary tickets to browse URLs in Webex.
Wrap enriched and skipped ticket keys in markdown links using JIRA_BASE_URL so keys are clickable in the hourly poller room summary.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 15:17:18 -04:00

30 lines
768 B
JavaScript

// services/jiraPoller/ticketIcons.js
//
// Component/kind → emoji mapping for poller Webex summary bullets.
export const COMPONENT_ICONS = {
'Mobility': '📱',
'Communication Services': '☎️',
'Audio Visual': '📺',
};
const KIND_ICONS = {
phone: '☎️',
av: '📺',
};
/**
* Pick the summary-bullet icon for a ticket.
* Prefer the first recognized Jira component; fall back to AI kind.
*
* @param {Array<{name?: string}>|null|undefined} components
* @param {'phone'|'av'|string} [kind]
* @returns {string}
*/
export function iconForTicket(components, kind) {
for (const c of components || []) {
const icon = COMPONENT_ICONS[c?.name];
if (icon) return icon;
}
return KIND_ICONS[kind] || '🎫';
}