fix: handle currentUser assignee filter correctly in JQL#13
Merged
Conversation
The buildJQL function was incorrectly wrapping the currentUser value in quotes, causing it to be treated as a literal string instead of a JIRA function. This resulted in showing issues assigned to all users instead of only the current user. Changes: - Modified buildJQL to detect 'currentUser' and convert to currentUser() - Added comprehensive tests for buildJQL function - All 93 tests passing
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the JQL query builder where the --assignee=currentUser filter was incorrectly treated as a literal string instead of a JIRA function, causing it to return all issues rather than only the current user's issues.
Key Changes:
- Modified the
buildJQL()function to detectcurrentUserand convert it to the propercurrentUser()function call syntax - Added comprehensive test coverage for the
buildJQL()function with 6 test cases covering various filter scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/utils.js | Updated assignee filter logic to handle currentUser as a JIRA function instead of a quoted string |
| tests/utils.test.js | Added test suite for buildJQL() with cases for project, assignee (both currentUser and specific user), status, multiple filters, and default behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions bot
pushed a commit
that referenced
this pull request
Dec 10, 2025
## [2.1.1](v2.1.0...v2.1.1) (2025-12-10) ### Bug Fixes * handle currentUser assignee filter correctly in JQL ([#13](#13)) ([91b1306](91b1306))
|
🎉 This PR is included in version 2.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Summary
Fixed a bug where
--assignee=currentUserfilter was showing issues assigned to all users instead of only the current user. The issue was that the JQL builder was incorrectly wrappingcurrentUserin quotes, treating it as a literal string instead of a JIRA function.🎯 Type of Change
🔍 Changes Made
buildJQL()inlib/utils.jsto detectcurrentUservalue and convert it tocurrentUser()function callbuildJQL()function intests/utils.test.js🧪 Testing
📊 Test Results
🚀 Deployment Notes
📝 Checklist
💬 Additional Notes
Before:
After: