Skip to content

Update jira-search-self-hosted extension#26991

Open
limonkufu wants to merge 3 commits intoraycast:mainfrom
limonkufu:ext/jira-search-self-hosted
Open

Update jira-search-self-hosted extension#26991
limonkufu wants to merge 3 commits intoraycast:mainfrom
limonkufu:ext/jira-search-self-hosted

Conversation

@limonkufu
Copy link
Copy Markdown
Contributor

@limonkufu limonkufu commented Apr 7, 2026

Description

I got sick of typing in the same issue types and projects on every query so this PR adds some configuration options for default filtering.

  • Configure default include and exclude filters for projects, statuses, issue types, and assignees in extension preferences.
    • If both include and exclude defaults are set for the same field, include defaults take precedence.
    • If you type a filter in the search box, it overrides the configured defaults for that field.
  • Defaults are applied to Search Issues and Open Issues.
  • Open Issues always uses the current user as assignee and ignores assignee defaults.
  • Include defaults override exclude defaults when both are configured for the same field.
  • Typed filters such as @project, #issueType, !status, and %assignee override defaults for that field.

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: jira-search-self-hosted Issues related to the jira-search-self-hosted extension platform: macOS labels Apr 7, 2026
@raycastbot
Copy link
Copy Markdown
Collaborator

raycastbot commented Apr 7, 2026

Thank you for your contribution! 🎉

🔔 @emanguy @svenwiegand @koseduhemak @LunaticMuch @marinsokol you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="ext/jira-search-self-hosted"
FORK_URL="https://github.com/limonkufu/raycast-extensions.git"
EXTENSION_NAME="jira-search-self-hosted"
REPO_NAME="raycast-extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@limonkufu limonkufu marked this pull request as ready for review April 7, 2026 21:57
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR adds configurable default filters (include/exclude for projects, statuses, issue types, and assignees) to the jira-search-self-hosted extension, applying them when no explicit filter is typed in the search box.

Overall: The logic for default filters, override precedence, and JQL generation looks correct. There are two P2 style/best-practice violations of repository conventions that should be addressed before merge.

Confidence: 4/5

Security: No security concerns identified.


Finding 1 — CHANGELOG.md line 3: Hardcoded date instead of {PR_MERGE_DATE} placeholder

The changelog entry uses 2026-04-07 instead of the required {PR_MERGE_DATE} placeholder (rule c2214c11). The placeholder is substituted at merge time; hardcoding a date breaks this convention.

Fix:

## [Update] - {PR_MERGE_DATE}

Finding 2 — src/preferences.ts lines 3–17: Manually defined preferences type and custom accessor functions

The file manually defines ExtensionPreferences (lines 3–15) and calls getPreferenceValues<Record<string, unknown>>() with custom readStringPreference/readBooleanPreference wrappers (line 17 onwards), instead of using the auto-generated Preferences namespace from raycast-env.d.ts.

This violates two rules:

  • d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8 — use the auto-generated Preferences type from raycast-env.d.ts rather than manually defining the interface.
  • 61aa4fa9-b8e8-41b4-8b27-f888b95b75af — call getPreferenceValues<Preferences.CommandName>() (or the extension-level equivalent) directly, not with Record<string, unknown> and a hand-rolled accessor layer.

Fix:

import { getPreferenceValues } from "@raycast/api";
import { Preferences } from "../raycast-env";

export const prefs = getPreferenceValues<Preferences.Issue>(); // or the appropriate command/extension namespace

The readStringPreference and readBooleanPreference helpers and the manual ExtensionPreferences interface can then be removed entirely.

Comment thread extensions/jira-search-self-hosted/CHANGELOG.md Outdated
Comment thread extensions/jira-search-self-hosted/src/preferences.ts Outdated
Comment thread extensions/jira-search-self-hosted/src/issue-search.ts
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 7, 2026

Greptile Summary

This PR adds configurable default filters (include/exclude for projects, statuses, issue types, and assignees) to Search Issues and Open Issues, applied when no explicit typed filter is used. The JQL-building logic is cleanly extracted into a new shared issue-search.ts module with correct precedence (typed filters override defaults; include defaults override exclude defaults).

  • The CHANGELOG entry uses a hardcoded date 2026-04-07 instead of the required {PR_MERGE_DATE} placeholder.
  • src/preferences.ts manually defines an ExtensionPreferences interface and wraps getPreferenceValues with custom accessors, contrary to Raycast conventions that rely on auto-generated types in raycast-env.d.ts.

Confidence Score: 4/5

Safe to merge after addressing the two Raycast convention issues

Core filter logic, JQL generation, and precedence rules are all correct. Two P2 convention violations — the hardcoded changelog date and the manually-defined preferences type — should be cleaned up before merging.

CHANGELOG.md (date placeholder) and src/preferences.ts (manual type definition)

Vulnerabilities

No security concerns identified.

Important Files Changed

Filename Overview
extensions/jira-search-self-hosted/CHANGELOG.md Changelog entry uses hardcoded date instead of required {PR_MERGE_DATE} placeholder
extensions/jira-search-self-hosted/package.json Adds 10 optional textfield preferences for default include/exclude filters; valid structure throughout
extensions/jira-search-self-hosted/src/issue-search.ts New shared JQL-building module with correct filter precedence and override semantics
extensions/jira-search-self-hosted/src/issue.ts Refactored to use shared buildIssueSearchJql; improved issue key validation regex
extensions/jira-search-self-hosted/src/open-issues.ts Refactored to use shared JQL builder with forced assignee and assignee defaults correctly disabled
extensions/jira-search-self-hosted/src/preferences.ts Manually defines Preferences type and wraps getPreferenceValues, violating Raycast auto-generation conventions
extensions/jira-search-self-hosted/README.md Documents new default filter preferences and override behavior clearly

Fix All in Codex Fix All in Cursor Fix All in Claude Code

Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/jira-search-self-hosted/CHANGELOG.md
Line: 3

Comment:
**Hardcoded date instead of `{PR_MERGE_DATE}` placeholder**

The changelog title uses a static date rather than the required placeholder; the date is populated automatically at merge time.

```suggestion
## [Update] - {PR_MERGE_DATE}
```

**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}`... ([source](https://app.greptile.com/review/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: extensions/jira-search-self-hosted/src/preferences.ts
Line: 3-17

Comment:
**Manual preference type definition against Raycast conventions**

Raycast auto-generates the `Preferences` interface in `raycast-env.d.ts` from `package.json`, so `ExtensionPreferences` should not be defined manually and `getPreferenceValues` should not be typed as `Record<string, unknown>` with custom accessors. The entire `readStringPreference`/`readBooleanPreference` layer is unnecessary.

```typescript
// preferences.ts
import { getPreferenceValues } from "@raycast/api";

export const prefs = getPreferenceValues<Preferences>();
```

All fields (`prefs.defaultIncludeProjects`, etc.) are then typed automatically from the generated interface.

**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "Update changelog" | Re-trigger Greptile

Comment thread extensions/jira-search-self-hosted/CHANGELOG.md Outdated
Comment thread extensions/jira-search-self-hosted/src/preferences.ts Outdated
- Address review feedback on preferences and changelog
- Update changelog
- Add default filter configurations
- Update changelog
- Add default filter configurations
- Add default filter configurations
@limonkufu
Copy link
Copy Markdown
Contributor Author

Hi @emanguy @svenwiegand @koseduhemak @LunaticMuch @marinsokol ,

any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: jira-search-self-hosted Issues related to the jira-search-self-hosted extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants