Repository navigation
Description
What we run into
tracker.jira.project is a single key, and the poller always conjoins it onto poll.query. A team that splits bugs and planned work across two projects cannot poll both, and the failure is silent rather than loud.
For one of our repositories the query is valid Jira:
(project = TEAMKEY OR (project = PRODUCTKEY AND component = TEAM))
and type = Bug and statusCategory != Done and updated > -1week and labels = fullsend
Product bugs are filed in a shared product project under a component; planned work lives in the team's own project. Written into tracker.jira.poll.query it becomes:
project = "TEAMKEY" AND (project = TEAMKEY OR (project = PRODUCTKEY AND component = TEAM)) AND ...
The second project's branch can never match. No error, no warning — half the intended coverage disappears, and only the first poll quiet cycle reveals it.
Three places encode the assumption
- Schema, one key.
Project stringvalidated as^[A-Z][A-Z0-9_]*$(internal/config/issue_targets.go:118,:464), documented as "the key of the single Jira project for this repository. It is not a fallback project" (docs/reference/config-reference.md:387). A list precedent already exists in the same mapping:tracker.jira.allowed_targets.projectsis[]string(issue_targets.go:295-299). - Query construction, pure concatenation.
ScopeJQLToProjectdoes not parse the predicate; it emitsproject = "<project>" AND (<query>)(issue_targets.go:225-244, called from:213; behaviour documented atdocs/reference/config-reference.md:415-417anddocs/guides/user/jira-integration.md:999-1003). - Role resolution, one roster per cycle. The project role roster is loaded once for
opts.JiraProject, and an issue whose key is in another project is forced toexternaland dropped (internal/jirapoll/convert.go:282-284). The guide states the coupling directly: "Because the query is always scoped toproject, the poller can always resolve Jira project roles for slash commands and label events" (docs/guides/user/jira-integration.md:1001-1003).
So this is not only a JQL wrapper change. (3) is the real work: roles must resolve per issue project, not per config key.
Impact today
Two installs. Each needs its own poll caller workflow, its own copy of the shared Jira token as a repo secret, its own lastCheck/lock entity properties, and its own dispatch path — and when an issue is linked across the two projects, both pollers can dispatch it.
Proposal
Let the poll span a set of projects:
tracker:
jira:
base_url: https://example.atlassian.net
project: TEAMKEY # unchanged: creation default and `fullsend issues` default
poll:
enabled: true
projects: [TEAMKEY, PRODUCTKEY] # new, optional; defaults to [project]
query: 'type=Bug and statusCategory != Done and updated > -1week and labels=fullsend'- Scoping becomes
project in ("TEAMKEY","PRODUCTKEY") AND (<query>), with a trailingORDER BYkept last. tracker.jira.projectkeeps its current meaning everywhere outside the poller.- Role rosters load lazily per project and are keyed by the issue's project; the existing fail-closed check stays, evaluated against the set. A roster load failure keeps failing the whole cycle, as
ensureRoleStructuredoes today. - Reject (or warn on) a
poll.querythat carries its ownproject =clause, so this shape cannot be written by accident again. M/Ncaps stay per cycle and are shared across the set.
Acceptance
- A config with two
poll.projectskeys produces one poll whose JQL isproject in (...). - A
PRODUCTKEY-*issue resolves roles against thePRODUCTKEYroster and aTEAMKEY-*issue againstTEAMKEY, in the same cycle. fullsend repos install/repos statusround-trip the new key with no drift, andValidateConnectionrejects an empty or malformed entry.- With
poll.projectsabsent, behaviour is byte-identical to today.
Version checked
v0.56.1 and main as of filing both carry all three constraints above.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
ifireball commentedon Nov 18, 2026
See #9199 for a counter proposal for the configuration shape.