Skip to content

Conversation

@michelle0927
Copy link
Collaborator

@michelle0927 michelle0927 commented Nov 5, 2025

Resolves #18948

Summary by CodeRabbit

  • New Features

    • Added method to fetch user-specific issue types and improved issue-type selection based on project context.
  • Bug Fixes

    • Stronger validation and clearer error when creating issues without required additional properties.
  • Chores

    • Incremented package and action/source metadata versions across the Jira integration.

@vercel
Copy link

vercel bot commented Nov 5, 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 Nov 5, 2025 6:24pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 5, 2025 6:24pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 5, 2025

Walkthrough

Version metadata updated across many Jira components. The Create Issue action gained dynamic-field retrieval, validation, and error handling changes. The Jira app added a getUserIssueTypes method and conditional issueType option loading; package version incremented.

Changes

Cohort / File(s) Change Summary
Version bumps - Actions
components/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs, components/jira/actions/add-comment-to-issue/add-comment-to-issue.mjs, components/jira/actions/add-multiple-attachments-to-issue/add-multiple-attachments-to-issue.mjs, components/jira/actions/add-watcher-to-issue/add-watcher-to-issue.mjs, components/jira/actions/assign-issue/assign-issue.mjs, components/jira/actions/create-custom-field-options-context/create-custom-field-options-context.mjs, components/jira/actions/create-version/create-version.mjs, components/jira/actions/delete-project/delete-project.mjs, components/jira/actions/get-all-projects/get-all-projects.mjs, components/jira/actions/get-issue/get-issue.mjs, components/jira/actions/get-task/get-task.mjs, components/jira/actions/get-transitions/get-transitions.mjs, components/jira/actions/get-user/get-user.mjs, components/jira/actions/get-users/get-users.mjs, components/jira/actions/list-issue-comments/list-issue-comments.mjs, components/jira/actions/search-issues-with-jql/search-issues-with-jql.mjs, components/jira/actions/transition-issue/transition-issue.mjs, components/jira/actions/update-comment/update-comment.mjs, components/jira/actions/update-issue/update-issue.mjs
Incremented exported version fields (minor bumps). No behavioral or signature changes.
Version bumps - Sources
components/jira/sources/events/events.mjs, components/jira/sources/issue-created/issue-created.mjs, components/jira/sources/issue-deleted/issue-deleted.mjs, components/jira/sources/issue-updated/issue-updated.mjs
Incremented exported version from 0.0.14 → 0.0.15. No functional changes.
Create Issue Enhancement
components/jira/actions/create-issue/create-issue.mjs
Import ConfigurationError; changed signature to async additionalProps(existingProps); added validation for projectId/cloudId/issueTypeId; try/catch around getCreateIssueMetadata; compute/filter dynamic fields; mark additionalProperties optional on success (non-optional on failure); runtime validation in run to require at least one additional property when no dynamic fields.
Jira App Enhancement
components/jira/jira.app.mjs
Added getUserIssueTypes(args = {}) calling /issuetype; changed issueType options to choose user-level vs project-specific issue types based on projectId being NaN; removed trailing periods from Cloud ID and Project ID descriptions.
Package Version
components/jira/package.json
Bumped package version 1.1.2 → 1.1.3.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CreateIssue as create-issue action
    participant JiraApp as jira.app
    participant JiraAPI as Jira API

    User->>CreateIssue: invoke create-issue (projectId, cloudId, issueTypeId, additionalProps)
    CreateIssue->>CreateIssue: validate projectId/cloudId/issueTypeId
    alt Invalid input
        CreateIssue-->>User: throw ConfigurationError
    else Valid input
        CreateIssue->>JiraApp: getCreateIssueMetadata(...)
        opt metadata request
            JiraApp->>JiraAPI: GET /rest/api/3/issue/createmeta
            JiraAPI-->>JiraApp: metadata
        end
        alt metadata success
            CreateIssue->>CreateIssue: extract & filter dynamicFields
            CreateIssue->>JiraAPI: POST /rest/api/3/issue (dynamicFields + additionalProps)
            JiraAPI-->>CreateIssue: success
            CreateIssue-->>User: return created issue
        else metadata failure
            CreateIssue->>CreateIssue: mark additionalProperties non-optional
            CreateIssue-->>User: throw ConfigurationError if no additionalProps
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–25 minutes

  • Pay extra attention to: components/jira/actions/create-issue/create-issue.mjs (new additionalProps signature, metadata retrieval, error handling, runtime validation) and components/jira/jira.app.mjs (new getUserIssueTypes method and conditional option loading).

Suggested reviewers

  • lcaresia

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is minimal, containing only 'Resolves #18948', which falls short of the expected template structure requiring a 'WHY' section. Complete the PR description by filling in the 'WHY' section of the template to explain the motivation and rationale for these changes.
Out of Scope Changes check ❓ Inconclusive Most changes are version bumps across multiple files, with only create-issue.mjs containing functional changes directly addressing issue #18948; version bumps appear to be standard maintenance. Clarify whether version bumps across all 25+ files are intentional or if this PR should focus solely on create-issue.mjs changes and related dependencies.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Jira - create-issue improvements' is directly related to the main change in the PR, which focuses on enhancing the Jira Create Issue action to support step references without dynamic props.
Linked Issues check ✅ Passed The PR addresses the core requirement from issue #18948 by adding validation logic and an error for missing properties in create-issue.mjs, supporting step references without relying solely on dynamic props.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch issue-18948

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

@michelle0927 michelle0927 marked this pull request as ready for review November 5, 2025 18:14
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: 1

Caution

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

⚠️ Outside diff range comments (1)
components/jira/actions/delete-project/delete-project.mjs (1)

46-46: Critical pre-existing bug: Template string not using backticks.

Line 46 uses double quotes instead of backticks, so the variable ${this.projectID} won't be interpolated and will appear literally in the output. Additionally, "successfuly" should be "successfully".

Apply this fix (note: this is pre-existing, not introduced by this PR):

-    $.export("$summary", "Project with ID: ${this.projectID} has been deleted successfuly.");
+    $.export("$summary", `Project with ID: ${this.projectID} has been deleted successfully.`);

Would you like me to open a separate issue to track this fix?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9346674 and c70e426.

📒 Files selected for processing (26)
  • 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/create-custom-field-options-context/create-custom-field-options-context.mjs (1 hunks)
  • components/jira/actions/create-issue/create-issue.mjs (3 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 (1 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 (4 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
🧠 Learnings (3)
📚 Learning: 2025-01-23T03:55:15.166Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 15376
File: components/monday/sources/name-updated/name-updated.mjs:6-6
Timestamp: 2025-01-23T03:55:15.166Z
Learning: Source names in Monday.com components don't need to start with "New" if they emit events for updated items (e.g., "Name Updated", "Column Value Updated") rather than new items. This follows the component guidelines exception where the "New" prefix is only required when emits are limited to new items.

Applied to files:

  • components/jira/sources/issue-updated/issue-updated.mjs
📚 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/jira/actions/add-attachment-to-issue/add-attachment-to-issue.mjs
📚 Learning: 2025-08-19T09:02:00.906Z
Learnt from: nurul3101
Repo: PipedreamHQ/pipedream PR: 18092
File: components/prisma_management_api/README.md:42-47
Timestamp: 2025-08-19T09:02:00.906Z
Learning: In Prisma Management API documentation, the "Delete Database" action intentionally uses this name even though it technically deletes an entire project (including all associated databases and resources) via projectId. This naming choice is deliberate and should not be flagged as inconsistent.

Applied to files:

  • components/jira/actions/delete-project/delete-project.mjs
🧬 Code graph analysis (2)
components/jira/actions/create-issue/create-issue.mjs (1)
components/jira/actions/update-issue/update-issue.mjs (3)
  • projectId (113-128)
  • keys (130-133)
  • dynamicFields (142-160)
components/jira/jira.app.mjs (3)
components/jira/actions/common/issue.mjs (1)
  • issueTypes (104-106)
components/jira/actions/update-issue/update-issue.mjs (1)
  • projectId (113-128)
components/jira/actions/create-issue/create-issue.mjs (1)
  • projectId (62-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). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
🔇 Additional comments (28)
components/jira/actions/get-users/get-users.mjs (1)

7-7: LGTM: Coordinated version bump.

The version increment is consistent with the broader package update across Jira components.

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

10-10: LGTM: Version bump aligns with package update.

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

7-7: LGTM: Consistent version increment.

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

7-7: LGTM: Version update is appropriate.

components/jira/package.json (1)

3-3: LGTM: Package version bump aligns with component updates.

The version increment from 1.1.2 to 1.1.3 is consistent with the coordinated version bumps across all Jira action components in this PR.

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

9-9: LGTM: Version increment is consistent.

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

7-7: LGTM: Version bump is appropriate.

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

9-9: LGTM: Version update is consistent with the package release.

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

8-8: LGTM: Version metadata bump.

This is a metadata-only change incrementing the action version from 0.0.6 to 0.0.7, with no functional modifications.

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

7-7: LGTM: Version metadata bump.

This is a metadata-only change incrementing the action version from 0.1.16 to 0.1.17, with no functional modifications.

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

8-8: LGTM: Version metadata bump.

This is a metadata-only change incrementing the action version from 0.1.16 to 0.1.17, with no functional modifications.

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

10-10: LGTM: Version metadata bump.

This is a metadata-only change incrementing the action version from 0.1.14 to 0.1.15, with no functional modifications.

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

6-6: LGTM: Version metadata bump.

This is a metadata-only change incrementing the action version from 0.0.13 to 0.0.14, with no functional modifications.

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

7-7: LGTM: Version metadata bump.

This is a metadata-only change incrementing the action version from 0.1.14 to 0.1.15, with no functional modifications.

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

7-7: LGTM: Version metadata bump.

This is a metadata-only change incrementing the source version from 0.0.14 to 0.0.15, with no functional modifications.

components/jira/sources/events/events.mjs (1)

8-8: LGTM: Version metadata bump.

This is a metadata-only change incrementing the source version from 0.0.14 to 0.0.15, with no functional modifications.

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

7-7: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

7-7: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

7-7: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

11-11: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

7-7: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

7-7: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

7-7: LGTM! Routine version bump.

Version incremented as part of package maintenance.

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

6-6: LGTM! Routine version bump.

Version incremented as part of package maintenance.

components/jira/jira.app.mjs (2)

63-72: LGTM! Conditional issue type fetching supports the PR objective.

The conditional logic appropriately falls back to user-level issue types when projectId is invalid or not yet selected, enabling the component to work without a project context. This supports the PR's goal of handling cases where dynamic props don't load correctly.


604-609: LGTM! New method properly implemented.

The getUserIssueTypes method follows the established pattern of other API methods in this file and correctly calls the user-level issue types endpoint.

components/jira/actions/create-issue/create-issue.mjs (2)

61-92: Good implementation of the fallback mechanism.

Assuming the condition on line 56 is fixed, this implementation correctly addresses the PR objective by providing a fallback to additionalProperties when dynamic props cannot be generated. The try-catch pattern ensures resilience, and the field filtering logic appropriately excludes project and issuetype which are already handled as dedicated props.


109-113: LGTM! Proper validation ensures data is provided.

The validation correctly enforces that at least one of dynamic fields or additionalProperties must be provided, preventing issues from being created without sufficient data. This aligns with the PR objective of supporting multiple ways to pass data.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c70e426 and 8e469c0.

📒 Files selected for processing (1)
  • components/jira/actions/create-issue/create-issue.mjs (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/jira/actions/create-issue/create-issue.mjs (1)
components/jira/actions/update-issue/update-issue.mjs (3)
  • projectId (113-128)
  • keys (130-133)
  • dynamicFields (142-160)
⏰ 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). (3)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (5)
components/jira/actions/create-issue/create-issue.mjs (5)

4-4: LGTM!

The ConfigurationError import is appropriately used in the runtime validation at line 112.


10-11: LGTM!

The version bump and documentation link update are appropriate for these changes.


62-88: LGTM!

The metadata retrieval and dynamic field generation logic is well-structured and consistent with the update-issue.mjs implementation. Excluding the ISSUETYPE and PROJECT keys is appropriate since they're already defined as props (lines 26-47), and setting additionalProperties.optional = true on success correctly enables the fallback mechanism.


109-113: LGTM!

This runtime validation effectively addresses the PR objective by ensuring that at least one method of providing field data (either dynamicFields or additionalProperties) is available. The use of the AND operator correctly requires both to be empty before throwing the error, allowing additionalProperties to serve as a fallback when dynamic props fail to load.


49-59: No action required — review comment is unfounded.

The additionalProperties prop is defined as a required field in components/jira/actions/common/issue.mjs (lines 32-37) without an optional: true flag. Unlike other optional props in the same file (updateProperties, properties, updateIssue), this ensures the property will always be present in existingProps when the framework calls additionalProps(). Accessing existingProps.additionalProperties.optional at lines 57, 84, and 90 is safe. The defensive check at line 110 only validates whether the object is empty, not whether it exists.

Copy link
Collaborator

@luancazarine luancazarine left a comment

Choose a reason for hiding this comment

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

Hi @michelle0927, LGTM! Ready for QA!

@vunguyenhung
Copy link
Collaborator

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

Test reports

@michelle0927 michelle0927 merged commit 3d4ee1f into master Nov 6, 2025
10 checks passed
@michelle0927 michelle0927 deleted the issue-18948 branch November 6, 2025 15:21
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.

Jira Create Issue - enable passing data without additionalProps

4 participants