Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Sep 1, 2025

WHY

Resolves #18094

Summary by CodeRabbit

  • New Features

    • Issue selectors now use a JQL-powered search to load recent issues faster with more relevant results and reduced data loading.
    • Parent field options are populated via JQL for improved performance and responsiveness.
  • Chores

    • Version bumps across multiple Jira actions and sources, including package version updates; no behavioral changes.

@jcortes jcortes self-assigned this Sep 1, 2025
@vercel
Copy link

vercel bot commented Sep 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Sep 1, 2025 9:24pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 1, 2025 9:24pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 1, 2025

Walkthrough

Updates primarily bump version metadata across multiple Jira actions and sources. Functional changes migrate issue option loading from getIssues to searchIssues with JQL and field filtering, rename/add the search method in jira.app, and refactor the JQL search action to call jira.searchIssues directly, removing a local wrapper.

Changes

Cohort / File(s) Summary
• • • • • • • • • • • • • • — Jira search API migration
components/jira/jira.app.mjs, components/jira/actions/common/issue.mjs
Replace getIssues with searchIssues using JQL "project is not EMPTY ORDER BY created DESC" and fields "id,key"; update dropdown option loaders accordingly.
• • • — JQL search action refactor
components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs
Remove local searchIssues wrapper; call this.jira.searchIssues(...) directly; bump version to 0.0.4.
• • • • • • — Version metadata bumps (actions)
components/jira/actions/add-attachment-to-issue/...mjs, .../add-comment-to-issue/...mjs, .../add-multiple-attachments-to-issue/...mjs, .../add-watcher-to-issue/...mjs, .../assign-issue/...mjs, .../create-custom-field-options-context/...mjs, .../create-issue/...mjs, .../create-version/...mjs, .../delete-project/...mjs, .../get-all-projects/...mjs, .../get-issue/...mjs, .../get-task/...mjs, .../get-transitions/...mjs, .../get-user/...mjs, .../get-users/...mjs, .../list-issue-comments/...mjs, .../transition-issue/...mjs, .../update-comment/...mjs, .../update-issue/...mjs
Patch version increments only; no logic changes.
• • — Version metadata bumps (sources)
components/jira/sources/events/events.mjs, .../issue-created/issue-created.mjs, .../issue-deleted/issue-deleted.mjs, .../issue-updated/issue-updated.mjs
Patch version increments only; no logic changes.
• — Package version bump
components/jira/package.json
Package version updated from 1.0.3 to 1.0.4.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as Config UI
  participant CreateIssue as Create Issue Action
  participant Common as common/issue.getOptions
  participant App as jira.app
  participant Jira as Jira API

  Note over User,CreateIssue: Configure "parent" prop options
  User->>CreateIssue: Request options for parent
  CreateIssue->>Common: getOptions(FIELD_KEY.PARENT)
  Common->>App: searchIssues({ jql, fields: "id,key", maxResults, startAt, cloudId })
  App->>Jira: GET /search/jql?jql=project%20is%20not%20EMPTY...&fields=id,key
  Jira-->>App: { issues: [ { id, key }, ... ] }
  App-->>Common: issues
  Common-->>CreateIssue: map to [{ value:id, label:key }]
  CreateIssue-->>User: Options list
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Migrate parent prop options loading to newer search-based API to resolve “API has been removed” error (#18094)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Version bumps across multiple Jira actions (components/jira/actions/.../*.mjs) Not required to meet the migration to the search-based API for the parent prop.
Version bumps in Jira sources (components/jira/sources/.../*.mjs) Unrelated to fixing parent prop options loading.
Package version bump (components/jira/package.json) Packaging metadata unrelated to the functional fix for #18094.

Suggested reviewers

  • lcaresia
  • GTFalcao

Poem

I thump my paws—release the squeal!
We switched to JQL, a sleeker deal.
No more “API removed,” hooray!
Parent picks now hop our way.
With fields id and key in view,
This rabbit ships a tidy queue. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-jira-api-has-been-removed-response

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
components/jira/actions/get-issue/get-issue.mjs (1)

60-66: Don’t JSON-parse the properties query param.
Jira’s Get Issue expects a comma-separated list (e.g., "*all" or "foo,bar"), not JSON. Parsing drops valid user input. Pass the string through as-is (or split/trim if you want an array), matching the description above.

-    let properties;
-    try {
-      properties = JSON.parse(this.properties);
-    } catch (err) {
-      //pass
-    }
+    const properties = this.properties; // Comma-separated string per Jira API
components/jira/actions/create-version/create-version.mjs (1)

91-91: Fix typo in user-facing summary.
“successfuly” → “successfully”.

-    $.export("$summary", `Version has been created successfuly. (ID:${response.id}, NAME:${response.name})`);
+    $.export("$summary", `Version has been created successfully. (ID:${response.id}, NAME:${response.name})`);
components/jira/actions/get-all-projects/get-all-projects.mjs (1)

24-29: Correct misleading prop description.
This action fetches projects; the current text refers to “issue properties”.

     properties: {
       propDefinition: [
         jira,
         "properties",
       ],
-      description: "Details of issue properties to be add or update, please provide an array of objects with keys and values.",
+      description: "Project properties to include in the response. Provide a JSON array of property keys (e.g., [\"foo\",\"bar\"]).",
     },
components/jira/actions/delete-project/delete-project.mjs (1)

41-41: Fix summary string interpolation and typo

The summary won’t interpolate and has a typo.

-    $.export("$summary", "Project with ID: ${this.projectID} has been deleted successfuly.");
+    $.export("$summary", `Project with ID: ${this.projectID} has been deleted successfully.`);
🧹 Nitpick comments (12)
components/jira/actions/create-issue/create-issue.mjs (1)

125-125: Fix typo in user-facing summary.
"successfuly" → "successfully".

-    $.export("$summary", `Issue has been created successfuly. (ID:${response.id}, KEY:${response.key})`);
+    $.export("$summary", `Issue has been created successfully. (ID:${response.id}, KEY:${response.key})`);
components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs (2)

56-59: Avoid relying on private form-data internals for headers.
Use data.getHeaders() instead of data._boundary to build the Content-Type reliably across versions.

-      const headers = {
-        "Content-Type": `multipart/form-data; boundary=${data._boundary}`,
-        "X-Atlassian-Token": "no-check",
-      };
+      const headers = {
+        ...data.getHeaders(),
+        "X-Atlassian-Token": "no-check",
+      };

41-70: Consider per-file error handling to not fail the entire batch.
Wrap the body of the loop in try/catch and push structured results (success/error) so users get partial success when one file fails.

components/jira/actions/transition-issue/transition-issue.mjs (1)

96-96: Polish the success message.
More natural phrasing.

-    $.export("$summary", `Transition has performed for the issue with ID(or key): ${this.issueIdOrKey}`);
+    $.export("$summary", `Transition performed for issue ${this.issueIdOrKey}.`);
components/jira/actions/get-all-projects/get-all-projects.mjs (1)

49-56: Remove stray argument not used by getAllProjects.
issueIdOrKey isn’t a prop here and doesn’t apply to listing projects.

       resourceFnArgs: {
         $,
-        issueIdOrKey: this.issueIdOrKey,
         params: {
           recent: this.recent,
           properties,
           expand: this.expand,
         },
       },
components/jira/actions/update-issue/update-issue.mjs (3)

101-107: Improve config error message and validation

Also require projectId and fix casing to match prop names.

-      if (!issueTypeId) {
-        throw new ConfigurationError("Please enter `projectId` and `IssueTypeId` to retrieve additional props.");
-      }
+      if (!projectId || !issueTypeId) {
+        throw new ConfigurationError("Please enter `projectId` and `issueTypeId` to retrieve additional props.");
+      }

109-123: Make metadata destructuring resilient

If projects/issuetypes are empty, this destructure can throw. Guard and default safely.

-      const {
-        projects: [
-          {
-            issuetypes: [
-              { fields = {} } = {},
-            ],
-          },
-        ],
-      } = await this.app.getCreateIssueMetadata({
+      const cim = await this.app.getCreateIssueMetadata({
         cloudId,
         params: {
           projectIds: projectId,
           issuetypeIds: issueTypeId,
           expand: "projects.issuetypes.fields",
         },
       });
+      const fields = cim?.projects?.[0]?.issuetypes?.[0]?.fields ?? {};

Please verify with a project/issuetype combo that returns zero results.


161-171: Build transition payload only when set

Current reduce of [transitionId, { id, looped }] is indirect. Construct explicitly to avoid accidental array/undefined artifacts.

-    const { transition } = utils.reduceProperties({
-      additionalProps: {
-        transition: [
-          transitionId,
-          {
-            id: transitionId,
-            looped: transitionLooped,
-          },
-        ],
-      },
-    });
+    const transition = transitionId
+      ? { id: transitionId, looped: transitionLooped }
+      : undefined;
components/jira/sources/events/events.mjs (1)

8-8: Version bump only — OK

While here: minor typo in description (Line 17) — “he Jira events” → “The Jira events”.

-      description: "he Jira events that trigger the webhook.",
+      description: "The Jira events that trigger the webhook.",
components/jira/jira.app.mjs (2)

99-99: Leverage user query for faster, cheaper dropdowns

Currently the JQL ignores user input. Add useQuery: true to the prop and include query in JQL (as shown in the previous diff) to reduce results and API load.

Additional change outside the modified hunk:

     issueIdOrKey: {
       type: "string",
       label: "Issue id or key",
       description: "The ID or key of the issue where the attachment will be added to.",
+      useQuery: true,

466-471: Good migration to enhanced search endpoint

Renaming getIssues → searchIssues and targeting /search/jql aligns with Atlassian’s removal of legacy /search endpoints. Keep both GET and POST support to handle very long JQL queries.

-    searchIssues(args = {}) {
-      return this._makeRequest({
-        path: "/search/jql",
-        ...args,
-      });
-    },
+    searchIssues({ method = "GET", ...args } = {}) {
+      return this._makeRequest({
+        method,
+        path: "/search/jql",
+        ...args,
+      });
+    },

Rationale: POST /search/jql supports large JQL bodies and array-typed fields more cleanly. (developer.atlassian.com)

components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (1)

95-109: Migration to enhanced JQL search is correct; consider exposing cursor pagination.
The new endpoint supports cursor-based pagination via nextPageToken; adding it makes the action usable beyond the first page. (developer.atlassian.com)

Apply within this hunk:

       const response = await this.jira.searchIssues({
         $,
         cloudId: this.cloudId,
         params: {
           jql: this.jql,
           maxResults: this.maxResults,
           fields: this.fields,
           expand: this.expand
             ? this.expand.join(",")
             : undefined,
           properties: this.properties,
           fieldsByKeys: this.fieldsByKeys,
           failFast: this.failFast,
+          nextPageToken: this.nextPageToken,
         },
       });

And add a new optional prop (outside this hunk) to pass the token:

nextPageToken: {
  type: "string",
  label: "Next Page Token",
  description: "Cursor returned by the previous response for fetching the next page",
  optional: true,
},
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 19a17f4 and f082aec.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs (1 hunks)
  • components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs (1 hunks)
  • components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs (1 hunks)
  • components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs (1 hunks)
  • components/jira/actions/assign-issue/assign-issue.mjs (1 hunks)
  • components/jira/actions/common/issue.mjs (1 hunks)
  • components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs (1 hunks)
  • components/jira/actions/create-issue/create-issue.mjs (1 hunks)
  • components/jira/actions/create-version/create-version.mjs (1 hunks)
  • components/jira/actions/delete-project/delete-project.mjs (1 hunks)
  • components/jira/actions/get-all-projects/get-all-projects.mjs (1 hunks)
  • components/jira/actions/get-issue/get-issue.mjs (1 hunks)
  • components/jira/actions/get-task/get-task.mjs (1 hunks)
  • components/jira/actions/get-transitions/get-transitions.mjs (1 hunks)
  • components/jira/actions/get-user/get-user.mjs (1 hunks)
  • components/jira/actions/get-users/get-users.mjs (1 hunks)
  • components/jira/actions/list-issue-comments/list-issue-comments.mjs (1 hunks)
  • components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (2 hunks)
  • components/jira/actions/transition-issue/transition-issue.mjs (1 hunks)
  • components/jira/actions/update-comment/update-comment.mjs (1 hunks)
  • components/jira/actions/update-issue/update-issue.mjs (1 hunks)
  • components/jira/jira.app.mjs (2 hunks)
  • components/jira/package.json (1 hunks)
  • components/jira/sources/events/events.mjs (1 hunks)
  • components/jira/sources/issue-created/issue-created.mjs (1 hunks)
  • components/jira/sources/issue-deleted/issue-deleted.mjs (1 hunks)
  • components/jira/sources/issue-updated/issue-updated.mjs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (3)
components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs (1)
  • response (58-64)
components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs (1)
  • response (69-82)
components/jira/actions/get-issue/get-issue.mjs (1)
  • response (66-77)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (25)
components/jira/actions/create-issue/create-issue.mjs (2)

10-10: Version bump only — looks good.
No functional changes.


21-41: Verify parent issue options use the new search-based API
No parent propDefinition was found in components/jira/actions/create-issue/create-issue.mjs; please confirm the parent field is configured to call jira.app.searchIssues({ jql, fields: ['id','key'] }) and that no deprecated endpoints remain.

components/jira/actions/get-issue/get-issue.mjs (1)

7-7: Version bump only — looks good.
No logic changes.

components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs (1)

9-9: Version bump only — looks good.
No functional changes.

components/jira/actions/assign-issue/assign-issue.mjs (1)

6-6: Version bump only — looks good.
No behavior change.

components/jira/actions/get-transitions/get-transitions.mjs (1)

7-7: Version bump only — looks good.
No logic changes.

components/jira/actions/transition-issue/transition-issue.mjs (1)

8-8: Version bump LGTM.
Matches broader Jira component updates.

components/jira/actions/create-version/create-version.mjs (1)

7-7: Version bump LGTM.
Consistent with the package-wide patch updates.

components/jira/actions/get-users/get-users.mjs (1)

7-7: Version bump LGTM.
No functional changes introduced.

components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs (1)

8-8: Version bump LGTM.
No behavior changes.

components/jira/actions/get-all-projects/get-all-projects.mjs (1)

7-7: Version bump LGTM.
Aligned with related Jira actions.

components/jira/package.json (1)

3-3: Approve version bump and refactor
Confirmed no calls to getIssues(), multiple usages of searchIssues(), and the Parent field’s getOptions now sources via search-based API.

components/jira/actions/update-comment/update-comment.mjs (1)

8-8: LGTM: Version bump only.
No functional changes detected.

components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs (1)

9-9: LGTM: Version bump only.
No functional changes detected.

components/jira/actions/get-user/get-user.mjs (1)

7-7: LGTM: Version bump only.
No functional changes detected.

components/jira/actions/get-task/get-task.mjs (1)

7-7: LGTM: Version bump only.
No functional changes detected.

components/jira/sources/issue-deleted/issue-deleted.mjs (1)

7-7: Version bump looks good

No functional changes. Safe to ship.

components/jira/sources/issue-updated/issue-updated.mjs (1)

7-7: Version bump looks good

No functional changes. Safe to ship.

components/jira/actions/update-issue/update-issue.mjs (1)

11-11: Version bump looks good

No behavior change detected here.

components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs (1)

6-6: Version bump looks good

No functional changes. Safe to ship.

components/jira/actions/delete-project/delete-project.mjs (1)

7-7: Version bump looks good

No logic changes.

components/jira/actions/list-issue-comments/list-issue-comments.mjs (1)

7-7: Version bump only — OK

No functional changes. Safe to merge.

components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs (1)

8-8: Version bump only — OK

No runtime impact.

components/jira/sources/issue-created/issue-created.mjs (1)

7-7: Version bump only — OK

No behavior changes.

components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs (1)

7-7: Version bump looks good.
No concerns with 0.0.4.

@vunguyenhung vunguyenhung merged commit 9b23afd into master Sep 3, 2025
10 checks passed
@vunguyenhung vunguyenhung deleted the fix-jira-api-has-been-removed-response branch September 3, 2025 04:42
@coderabbitai coderabbitai bot mentioned this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] JIRA responding that the API has been removed

3 participants