Skip to content

5152 update requests export with inactive items #5211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

bsbonus
Copy link
Contributor

@bsbonus bsbonus commented May 29, 2025

Checklist:

X I have performed a self-review of my own code,
X I have commented my code, particularly in hard-to-understand areas,
X I have made corresponding changes to the documentation,
X I have added tests that prove my fix is effective or that my feature works,
X New and existing unit tests pass locally with my changes ("bundle exec rake"),
X Title include "WIP" if work is in progress.
X I acknowledge that I will not force push my branch once reviews have started.

Resolves #5152 partially

Description

Updates the "requests" export to include inactive items in the columns.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  1. Ensure you have inactive items in your data set
  2. Navigate to the "Requests" page
  3. Click export before fix -> notice the number of columns
  4. Click export after fix -> notice the updated number of columns, including the inactive item(s)

Screenshots

requests_before_fix.csv
requests_after_fix.csv

@cielf
Copy link
Collaborator

cielf commented May 30, 2025

passes functional test

@cielf cielf requested a review from dorner May 30, 2025 13:55
Copy link
Collaborator

@dorner dorner left a comment

Choose a reason for hiding this comment

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

Minor suggestion.

# Include inactive items or items that are otherwise not in any item_requests
@organization_items.each do |item|
if item_names.exclude?(item.name)
item_names << item.name
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can item_names be a set instead of an array? Then this is automatically handled.

@dorner
Copy link
Collaborator

dorner commented May 30, 2025

Also tests seem to be failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exports should show all items - not just the ones that have data in the filtered list
3 participants