[Jira] Fix false-positive "field name is duplicated" warnings when multiple boards share a connection - #9053
Open
bramhanandlingala wants to merge 1 commit into
Open
[Jira] Fix false-positive "field name is duplicated" warnings when multiple boards share a connection#9053bramhanandlingala wants to merge 1 commit into
bramhanandlingala wants to merge 1 commit into
Conversation
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.
closes: #9052
Summary
getIssueFieldMap() logged a "field name is duplicated" warning every time
a field name appeared more than once in _tool_jira_issue_fields, even when
it was the exact same field just present on multiple boards. On a
connection with several boards this produced hundreds of false-positive
warnings per pipeline run.
Root cause
_tool_jira_issue_fields stores one row per (connection_id, board_id, field
id), so a field present on N boards produces N rows with the same ID but
the same Name. getIssueFieldMap() warned on any second occurrence of a
Name without checking whether the ID actually differed, so board
recurrence was misread as a name collision.
Fix
Only warn when two different field IDs share the same display name, which
is the actual ambiguous case. The existing SchemaType == "user" override
is unchanged. Also fixed a typo in the log message: "filed name" -> "field
name".