Skip to content

CAMEL-23576: camel-jira - align Exchange header constant names with Camel naming convention#23417

Merged
oscerd merged 3 commits into
apache:mainfrom
oscerd:fix/CAMEL-23576
May 22, 2026
Merged

CAMEL-23576: camel-jira - align Exchange header constant names with Camel naming convention#23417
oscerd merged 3 commits into
apache:mainfrom
oscerd:fix/CAMEL-23576

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 21, 2026

Summary

  • Renames the Exchange header string values in JiraConstants from non-Camel-prefixed values (IssueKey, ProjectKey, IssueTransitionId, linkType, minutesSpent, …) to CamelJira<Name>, following the convention used across the rest of the Camel component catalog.
  • The Java field names (ISSUE_KEY, ISSUE_PROJECT_KEY, LINK_TYPE, …) are unchanged so routes referencing the constants symbolically continue to work without modification.
  • The generated Endpoint DSL header accessors on JiraHeaderNameBuilder are renamed accordingly (issueKey()jiraIssueKey(), projectKey()jiraIssueProjectKey(), linkType()jiraLinkType(), …).
  • Producer error messages that quote the old header names are updated for consistency.
  • Upgrade-guide entry added in camel-4x-upgrade-guide-4_21.adoc.

This follows the rename pattern established in CAMEL-23526 (camel-cxf), CAMEL-23461 (camel-aws-bedrock), CAMEL-23522 (camel-mail), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), CAMEL-23515 (camel-nats), and CAMEL-23516 (camel-xmpp).

Tracking ticket: CAMEL-23577 (global sweep) — this is one of the cluster sub-tasks.

Backports

The defect predates 4.x; JiraConstants has the same layout on camel-4.18.x and camel-4.14.x. Targeted fix versions: 4.21.0, 4.18.3, 4.14.8.

Test plan

  • mvn -DskipTests install in components/camel-jira — catalog and component docs regenerated cleanly.
  • Full reactor build mvn clean install -DskipTests from repo root — endpoint DSL JiraEndpointBuilderFactory regenerated with new method names; no other regen drift.
  • No literal-string usages of the old header values exist anywhere in the repo outside JiraConstants.java (verified by grep across src/main, src/test, *.adoc, *.xml, *.json).
  • All test code already references the Java fields (ISSUE_KEY, ISSUE_TRANSITION_ID, …) via static import — no test changes required.
  • CI verifies the full build (no local-only failures).

Reported by Claude Code on behalf of Andrea Cosentino

…amel naming convention

Renames the Exchange header string values in JiraConstants from non-Camel
prefixed values (IssueKey, ProjectKey, IssueTransitionId, linkType,
minutesSpent, ...) to CamelJira<Name>, following the convention used across
the rest of the Camel component catalog and matching the pattern established
in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461
(camel-aws-bedrock), and CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy).

The Java field names (ISSUE_KEY, ISSUE_PROJECT_KEY, LINK_TYPE, ...) are
unchanged so routes referencing the constants symbolically continue to work;
routes using the literal string values must be updated (documented in the
4.21 upgrade guide).

The generated Endpoint DSL header accessors on JiraHeaderNameBuilder have
been renamed accordingly (issueKey() -> jiraIssueKey(), projectKey() ->
jiraIssueProjectKey(), linkType() -> jiraLinkType(), ...). Updates the
producer error messages that quote the header name for consistency.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd requested review from Croway and davsclaus May 21, 2026 10:30
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-jira
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JIRA
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

LGTM — clean, well-documented header rename following the established CAMEL-23577 sweep pattern.

What's good:

  • All 20 @Metadata-annotated headers + ISSUE_COMMENT renamed consistently to CamelJira<Name>
  • Non-header constants (JIRA_REST_CLIENT_FACTORY, ACCESS_TOKEN, etc.) correctly left unchanged
  • Producer error messages updated to match new header names
  • Comprehensive upgrade guide entry with full old→new mapping table
  • All generated files (catalog JSON, endpoint DSL) regenerated
  • Tests pass without changes (they use symbolic constants)

One minor pre-existing doc issue flagged inline — not blocking.

Claude Code on behalf of Guillaume Nodet

Comment thread components/camel-jira/src/main/docs/jira-component.adoc Outdated
Comment thread components/camel-jira/src/main/docs/jira-component.adoc Outdated
oscerd and others added 2 commits May 21, 2026 13:32
Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
…ue too

Mirror the fix from 4b6d87a (AddIssue section) on the UpdateIssue section.
`IssueDescription` is not a header constant; the description is read from
the exchange body in `UpdateIssueProducer` as well, so the misleading bullet
is replaced with a body-as-description note.

Addresses the second of the two review comments from @gnodet on PR apache#23417.

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd requested a review from gnodet May 21, 2026 16:27
Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

Looks good — all 19 header values correctly renamed to CamelJira* PascalCase convention. Good call excluding the non-header constants (OAuth keys, JiraRestClientFactory registry binding). Upgrade guide is thorough with full old-to-new mapping.

Claude Code on behalf of Guillaume Nodet

@oscerd oscerd merged commit 3240a17 into apache:main May 22, 2026
7 checks passed
@oscerd oscerd deleted the fix/CAMEL-23576 branch May 22, 2026 07:30
oscerd added a commit that referenced this pull request May 22, 2026
…amel naming convention (#23460)

Backport of #23417 onto camel-4.18.x (target 4.18.3). Renames JiraConstants header values to CamelJira* (Java field names unchanged); documented in the 4.18 upgrade guide as a potential breaking change. Part of CAMEL-23577.
oscerd added a commit that referenced this pull request May 22, 2026
…amel naming convention (#23472)

Backport of #23417 onto camel-4.14.x (target 4.14.8). Renames JiraConstants header values to CamelJira* (Java field names unchanged); documented in the 4.14 upgrade guide as a potential breaking change. Part of CAMEL-23577.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants