Add store/email/phone filtering, richer call-line formatting, CDR feed pagination and queueing, and split Jira poller enrichment into testable modules. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .. | ||
| enrichmentRules.js | ||
| formatBody.js | ||
| README.md | ||
| runEnrichment.js | ||
Jira poller enrichment
Hourly automation that enriches unassigned Jira tickets with CollabFinder
command output posted as ADF comments. Orchestrated by
services/jiraPollerService.js; scheduled in
index.js when JIRA_POLLER_ROOM_ID is set.
Flow
JQL search → classifyTicket (AI) → resolveEnrichmentPlan (rules)
→ runEnrichmentChecks (collectors + renderers) → Jira ADF comment
→ label bot-enriched → Webex summary
Idempotency uses Jira labels (bot-enriched, bot-skipped), not local
state. Transient failures leave the ticket unlabeled for retry next hour.
Communication Services symptom rules
For tickets with component Communication Services and a resolvable store:
| Symptom keywords | Checks run |
|---|---|
| Call quality / connectivity (garbled, static, can't connect, …) | phonestatus + callreport |
| Spam / robocall / nuisance | callreport only |
| Neither | Default: phone → phonestatus, av → avstatus |
callreport uses the today business window (9am local → now minus 5 min).
Store number comes from the AI classifier; if missing but a symptom rule
matched, the planner falls back to Store NNNN in the summary.
Adding a new symptom rule
- Open
enrichmentRules.js. - Add regex patterns to
CALL_QUALITY_PATTERNS,SPAM_PATTERNS, or a new pattern list. - Extend
resolveEnrichmentPlan()to push a rule id intomatchedRulesand append check ids tochecks. - Add tests in
tests/jiraPoller.enrichmentRules.test.js.
Adding a new enrichment check
- Register the check in
CHECK_IDSandCHECK_RUNNERSinrunEnrichment.js(collector + renderer, same as the chat command). - Reference the new check id from a rule in
enrichmentRules.js. - Add tests in
tests/jiraPoller.runEnrichment.test.js.
Manual trigger
/jirapoll run poller now
/jirapoll prime label backlog without enriching (one-time adoption)
Environment
| Variable | Purpose |
|---|---|
JIRA_POLLER_ROOM_ID |
Webex room for hourly summary + enables cron |
JIRA_STORE_FIELD_ID |
Pin Store Number custom field id |
JIRA_POLLER_MODEL |
Override X.AI model for classification |
CDR_FEED_COOLDOWN_MS |
cdr_feed rate limit (default 65000) for callreport |
See .env.example for full Jira poller section.