-
-
Notifications
You must be signed in to change notification settings - Fork 307
Introduce multi-project filter support #916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This doesn't change the init procedure, but enables advanced users to add multiple project keys in the config.yaml so they can see issues from more than one project in the default view without appending a custom query every time they want to see a dashboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces support for multi-project filtering in JQL queries by detecting when the project parameter contains multiple projects (formatted with parentheses) and adjusting the JQL syntax accordingly. This allows advanced users to manually configure multiple project keys in their config.yaml file to view issues from multiple projects without appending custom queries each time.
- Adds logic to detect multi-project format (strings starting and ending with parentheses) in
NewJQL() - Dynamically selects the appropriate JQL format string based on single vs. multi-project input
- Changes the filter initialization to use the selected format
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func NewJQL(project string) *JQL { | ||
| var f string | ||
| if strings.HasPrefix(project, "(") && strings.HasSuffix(")") { | ||
| f = "project=%q" | ||
| } else { | ||
| f = "project in %s" | ||
| } | ||
| return &JQL{ | ||
| project: project, | ||
| filters: []string{fmt.Sprintf("project=%q", project)}, | ||
| filters: []string{fmt.Sprintf(f, project)}, | ||
| } | ||
| } |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test coverage for this file indicates that new functionality should be tested. There are no tests for the multi-project filter support introduced in this PR. Add test cases that verify the JQL output for both single project (e.g., "TEST") and multi-project formats (e.g., "(TEST, PROJ2)").
This doesn't change the init procedure, but enables advanced users to add multiple project keys in the config.yaml so they can see issues from more than one project in the default view without appending a custom query every time they want to see a dashboard.