Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Jan 1, 2026

Resolves #17251

Summary by CodeRabbit

  • New Features

    • Added ability to upload and attach files to bugs in Zoho Bugtracker.
  • Improvements

    • Simplified bug creation and update workflows with streamlined field selection.
    • Updated field naming conventions for better clarity (improved ID labeling).
    • Enhanced API integration with Zoho Bugtracker v3 for improved reliability.
    • Refined bug detection polling logic for more accurate real-time updates.
  • Updates

    • Version bumped to 0.3.0 with multiple action improvements.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 1, 2026

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jan 1, 2026 4:26pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 1, 2026

Walkthrough

This PR updates the Zoho BugTracker component with API schema changes, refactored field mappings, and a new dedicated action for file attachments. Key changes include migrating from /restapi to /api/v3 endpoints, renaming resource paths from "bugs" to "issues," simplifying prop definitions by removing obsolete fields, introducing a new "Add Attachment To Bug" action to replace inline file upload functionality, and updating pagination logic and data shape handling across multiple action files.

Changes

Cohort / File(s) Summary
New Action: Add Attachment To Bug
components/zoho_bugtracker/actions/add-attachment-to-bug/add-attachment-to-bug.mjs
New action implementing two-step attachment workflow: uploads file as global attachment, then associates it with a bug. Handles file streaming, FormData construction, and attachment metadata (storage_type, location_details).
App Configuration & API Methods
components/zoho_bugtracker/zoho_bugtracker.app.mjs
Major refactor: updated base URL from /restapi to /api/v3; renamed resource endpoints from "bugs" to "issues"; refactored _makeRequest() to accept explicit URL override; added three new methods (updateBug, uploadGlobalAttachment, addAttachmentToIssue); updated pagination logic with resourceKey support and has_next_page checking; simplified/removed deprecated prop definitions (classificationId, moduleId, severityId, etc.); updated field mappings (assignee, bugId, title→name) and label capitalization (ID vs Id).
Create & Update Bug Actions
components/zoho_bugtracker/actions/create-bug/create-bug.mjs, components/zoho_bugtracker/actions/update-bug/update-bug.mjs
Removed file upload support (uploaddoc, syncDir, FormData handling); renamed title prop to name; simplified assignee prop (removed projectId dependency); removed deprecated fields (classificationId, moduleId, severityId, reproducibleId, statusId); updated field mappings to use nested objects (release_milestone, affected_milestone with id; assignee with zpuid); changed API response parsing and summary text; version bumped to 0.2.0; documentation URLs updated.
Polling Source & Constants
components/zoho_bugtracker/sources/new-bug-reported/new-bug-reported.mjs, components/zoho_bugtracker/common/constants.mjs
Source: updated polling parameters (sort_by instead of sort_column/sort_order); changed date comparison to use Date.parse(created_time) instead of created_time_long; updated event payload (id, summary, ts fields); adjusted deployment hook interval. Constants: renamed export range to limit.
Metadata Updates
components/zoho_bugtracker/actions/get-bug-details/get-bug-details.mjs, components/zoho_bugtracker/package.json
Version updates and documentation link changes; minor capitalization fix ("Id" → "ID" in get-bug-details summary); package.json version bumped from 0.2.3 to 0.3.0.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal and only references issue #17251 without explaining the changes or rationale. Add a detailed description explaining the API v3 migration, changes to existing actions, and the new add-attachment-to-bug action. Reference the issue context and explain how this resolves the attachment problem.
Linked Issues check ❓ Inconclusive Changes address the attachment issue by introducing a dedicated add-attachment-to-bug action, but removed uploaddoc/syncDir from create-bug and update-bug actions, potentially breaking existing workflows. Clarify whether the removed file upload fields in create-bug and update-bug are intentional breaking changes or if attachment handling should remain available in those actions.
Out of Scope Changes check ❓ Inconclusive PR includes broader API v3 migration changes beyond the attachment fix, including endpoint renames, field mappings, and property removals. Confirm whether the API v3 migration is part of the scope for issue #17251 or if it should be separated into a different PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main changes: API v3 migration and a new attachment action.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 7

Caution

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

⚠️ Outside diff range comments (1)
components/zoho_bugtracker/actions/create-bug/create-bug.mjs (1)

95-107: Remove unused projectId from bugFollowers resolver.

The bugFollowers prop definition in the app file only destructures page and portalId from the options parameter. Passing projectId here has no effect.

🔎 Proposed fix
     bugFollowers: {
       propDefinition: [
         zohoBugtracker,
         "bugFollowers",
-        ({
-          portalId, projectId,
-        }) => ({
+        ({ portalId }) => ({
           portalId,
-          projectId,
         }),
       ],
       optional: true,
     },
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8aa2311 and 0319ccf.

📒 Files selected for processing (8)
  • components/zoho_bugtracker/actions/add-attachment-to-bug/add-attachment-to-bug.mjs
  • components/zoho_bugtracker/actions/create-bug/create-bug.mjs
  • components/zoho_bugtracker/actions/get-bug-details/get-bug-details.mjs
  • components/zoho_bugtracker/actions/update-bug/update-bug.mjs
  • components/zoho_bugtracker/common/constants.mjs
  • components/zoho_bugtracker/package.json
  • components/zoho_bugtracker/sources/new-bug-reported/new-bug-reported.mjs
  • components/zoho_bugtracker/zoho_bugtracker.app.mjs
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-20T01:01:02.970Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 18744
File: components/slack_v2/actions/send-large-message/send-large-message.mjs:49-64
Timestamp: 2025-10-20T01:01:02.970Z
Learning: In components/slack_v2/actions/send-large-message/send-large-message.mjs, the metadata_event_payload prop is typed as string, so the code only needs to handle string-to-JSON parsing and does not need to handle object inputs.

Applied to files:

  • components/zoho_bugtracker/actions/update-bug/update-bug.mjs
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.

Applied to files:

  • components/zoho_bugtracker/zoho_bugtracker.app.mjs
🧬 Code graph analysis (3)
components/zoho_bugtracker/actions/add-attachment-to-bug/add-attachment-to-bug.mjs (1)
components/zoho_bugtracker/actions/create-bug/create-bug.mjs (1)
  • response (147-152)
components/zoho_bugtracker/actions/update-bug/update-bug.mjs (1)
components/zoho_bugtracker/actions/create-bug/create-bug.mjs (3)
  • data (110-120)
  • preData (122-145)
  • response (147-152)
components/zoho_bugtracker/actions/create-bug/create-bug.mjs (1)
components/zoho_bugtracker/actions/update-bug/update-bug.mjs (3)
  • data (116-126)
  • preData (128-146)
  • response (148-154)
⏰ 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: pnpm publish
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (7)
components/zoho_bugtracker/package.json (1)

3-3: LGTM! Appropriate version bump for API migration and new features.

The minor version bump from 0.2.3 to 0.3.0 correctly reflects the addition of the new attachment action and the migration to API v3.

components/zoho_bugtracker/actions/get-bug-details/get-bug-details.mjs (1)

6-6: LGTM! Clean metadata and documentation updates.

The version bump, updated documentation URL for API v3, and capitalization fix are all appropriate minor improvements.

Also applies to: 12-12, 59-59

components/zoho_bugtracker/common/constants.mjs (1)

1-1: Constant rename from range to limit is complete. All imports have been updated successfully. The new constant is properly imported in three files (zoho_bugtracker.app.mjs, unbounce.app.mjs, and list-page-leads.mjs), and no remaining references to the old constant name exist.

components/zoho_bugtracker/actions/add-attachment-to-bug/add-attachment-to-bug.mjs (1)

73-93: Methods are properly defined and implement the correct two-step attachment process.

Both uploadGlobalAttachment (line 259) and addAttachmentToIssue (line 268) are defined in zoho_bugtracker.app.mjs using API v3 endpoints. The implementation correctly follows the two-step process: uploading a global attachment first, extracting its ID, then associating it with the issue.

components/zoho_bugtracker/actions/update-bug/update-bug.mjs (1)

1-159: LGTM!

The update to API v3 is well-implemented. The payload construction with clearObj correctly handles optional fields, and the field mappings (release_milestone, affected_milestone, assignee with zpuid) align with the Zoho API v3 schema. The name prop being optional is appropriate for an update operation.

components/zoho_bugtracker/actions/create-bug/create-bug.mjs (1)

109-156: LGTM!

The preData construction is well-structured, correctly mapping fields to the Zoho API v3 schema. The use of clearObj ensures undefined optional fields are excluded from the payload. The pattern is consistent with update-bug.mjs.

components/zoho_bugtracker/zoho_bugtracker.app.mjs (1)

259-276: The attachment API subdomain is correct. Per Zoho Projects API v3 documentation, attachment endpoints properly use the projectsapi subdomain with the path /api/v3/portal/{portalId}/attachments. The implementation correctly distinguishes attachment endpoints from other issue management endpoints.

Copy link
Collaborator

@GTFalcao GTFalcao left a comment

Choose a reason for hiding this comment

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

LGTM!

@vunguyenhung
Copy link
Collaborator

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test reports

@michelle0927 michelle0927 merged commit d0c7e7a into master Jan 5, 2026
9 checks passed
@michelle0927 michelle0927 deleted the issue-17251 branch January 5, 2026 15:32
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] Zoho BugTracker file attachment has no effect

4 participants