Skip to content

Fix Jira issue key column width being hardcoded - #2178

Merged
FelicianoTech merged 1 commit into
wtfutil:trunkfrom
bklaas:fix/jira-issue-key-column-width
Sep 29, 2026
Merged

FelicianoTech merged 1 commit into
wtfutil:trunkfrom
bklaas:fix/jira-issue-key-column-width

Conversation

@bklaas

@bklaas bklaas commented Aug 31, 2026 •

Copy link
Copy Markdown

Purpose

getLongestColumnLengths() in modules/jira/widget.go assigns len("WTF-XXX")
to longestKeyLength rather than the issue key's actual length. 7 characters is not enough for many Jira tickets.

example of the bug:
Screenshot From 2026-08-31 11-40-16

Change this line to expand longestKeyLength to the maximum in the issue list, not a max of 7 characters

Add unit tests

getLongestColumnLengths() assigned len("WTF-XXX") to longestKeyLength
instead of the issue key's actual length, with the correct value left
in place as a trailing comment:

    longestKeyLength = len("WTF-XXX") // issueKeyLength

The row format pads the key to longestKeyLength+1, so the column was
always 8 wide. Any key longer than that overflows its field and shifts
every subsequent column left by the overflow, so projects whose keys
differ in length render ragged:

    Bug    GRID-11658 Ready        [Triggered] critical celery task...
    Task   PROD-1901 In Progress  necessary datamodel changes

Using the real key length restores the intended alignment:

    Bug    GRID-11658  Ready        [Triggered] critical celery task...
    Task   PROD-1901   In Progress  necessary datamodel changes

Issue keys have no equivalent of MaxIssueTypeLength/MaxStatusNameLength
clamping them, which is why this only affects the key column.

Adds tests covering the longest-key case, the equal-length case, and the
existing clamping of the type and status columns.

@FelicianoTech FelicianoTech left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you.

@FelicianoTech
FelicianoTech merged commit 163f4ac into wtfutil:trunk Sep 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址