feat(jira): support multiple components in project settings (SC-13173)#15039
Open
Maffooch wants to merge 1 commit into
Open
feat(jira): support multiple components in project settings (SC-13173)#15039Maffooch wants to merge 1 commit into
Maffooch wants to merge 1 commit into
Conversation
The JIRA project component field is a single text value that was sent to Jira as one component named after the whole string (e.g. "Security,DevSecOps"). prepare_jira_issue_fields now splits the value on commas (trimming whitespace and dropping empty entries) so Jira receives a separate component per name. The project form documents that commas separate multiple components. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
Member
|
Yeah I understand. I think having commas in a component name is not very common. So maybe a note in the upgrade notes is enough. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Implements SC-13173 — allow assigning more than one Jira component from a project's settings.
The JIRA project
componentfield is a single text value that was sent to Jira as one component named after the entire string (e.g.Security,DevSecOps) instead of separate components. Jira's REST API expects a list:[{"name": "Security"}, {"name": "DevSecOps"}].Changes
prepare_jira_issue_fieldsnow splits the component value on commas, trims whitespace, and drops empty entries, producing one Jira component per name. A single value without commas still yields one component.JIRAProjectFormdocuments that commas separate multiple components (form-level help text; no migration).Known limitation
A component whose name legitimately contains a comma would be split. This is an accepted trade-off given component names rarely contain commas.
Testing
unittests.test_jira_helper.JIRAComponentFieldTest— new (verified red→green): single value, comma split, whitespace trimming, empty-entry dropping, and field omission when no component is set.test_jira_helper→ 11 OK,test_jira_config_product→ 15 OK.🤖 Generated with Claude Code