Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 15, 2025

The Status and Created At columns in the markdown output were displaying swapped data due to a mismatch between column header ordering and data writing logic.

Problem

When HIDE_STATUS and HIDE_CREATED_AT were both set to false, the generated table showed:

  • Status column containing date/time values (e.g., "2025-08-12 14:13:34+00:00")
  • Created At column containing status values (e.g., "closed as None")

This occurred because the column headers were defined in one order while the actual data was written in a different order.

Root Cause

In markdown_writer.py, the get_non_hidden_columns() function defined columns in this order:

# Column header order
...Status, Time in draft, Label metrics, Created At

But the write_to_markdown() function wrote data in this order:

# Data writing order
...Time in draft, Label metrics, Created At, Status

Solution

Reordered the column definitions in get_non_hidden_columns() to match the data writing sequence in write_to_markdown(). Now both the headers and data follow the same order:

...Time in draft, Label metrics, Created At, Status

Testing

  • Updated existing tests to reflect the correct column order
  • Added focused test cases to verify Status and Created At columns contain appropriate data types
  • Confirmed all 114 existing tests continue to pass

Fixes #568.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Aug 15, 2025

@zkoppert 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] The contents of the cells do not match the column names Status and Created At Fix Status and Created At column header/data alignment issue Aug 15, 2025
@Copilot Copilot AI requested a review from zkoppert August 15, 2025 14:10
Copilot finished work on behalf of zkoppert August 15, 2025 14:10
@github-actions github-actions bot added the fix label Aug 15, 2025
@zkoppert zkoppert changed the title Fix Status and Created At column header/data alignment issue fix: Status and Created At column header/data alignment issue Aug 15, 2025
@zkoppert
Copy link
Member

@copilot can you fix the failing GitHub actions on this pull request?

- Fixed line length violations by splitting long lines
- Moved import to top level to avoid import-outside-toplevel error
- Fixed trailing whitespace and formatting issues
- Added final newline to meet linting requirements

All 114 tests continue to pass with 91% coverage.

Co-authored-by: zkoppert <[email protected]>
Copy link
Contributor Author

Copilot AI commented Aug 15, 2025

@copilot can you fix the failing GitHub actions on this pull request?

Fixed the failing GitHub Actions. The issue was linting errors in the test file including line length violations, import placement, and formatting issues. All problems have been resolved in commit f0395d6. All 114 tests now pass with 91% coverage and linting is clean.

Copilot finished work on behalf of zkoppert August 15, 2025 15:18
@zkoppert zkoppert marked this pull request as ready for review August 15, 2025 15:38
@zkoppert zkoppert requested a review from a team as a code owner August 15, 2025 15:38
@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 15:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a column header/data alignment issue where the Status and Created At columns were displaying swapped data in markdown output. The problem occurred when both HIDE_STATUS and HIDE_CREATED_AT were set to false, causing status values to appear in the Created At column and vice versa.

Key changes:

  • Reordered column definitions in get_non_hidden_columns() to match the data writing sequence in write_to_markdown()
  • Updated existing tests to reflect the correct column order
  • Added comprehensive test coverage to verify the Status and Created At columns contain appropriate data types

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
markdown_writer.py Moved Status column definition after Created At column to align with data writing order
test_markdown_writer.py Updated expected column headers in test assertions to match new correct order
test_column_order_fix.py Added new test file with focused test cases to verify Status and Created At columns alignment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@jmeridth jmeridth merged commit 65f43f4 into main Aug 15, 2025
32 checks passed
@jmeridth jmeridth deleted the copilot/fix-568 branch August 15, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The contents of the cells do not match the column names Status and Created At
3 participants