Skip to content
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

CSV export fixes #2366

Merged
merged 2 commits into from
Sep 6, 2023
Merged

CSV export fixes #2366

merged 2 commits into from
Sep 6, 2023

Conversation

Atmire-Kristof
Copy link
Contributor

References

Description

This PR fixes two issues:

  • CSV export got disabled by default in Add flag to show/hide csv export button #2093 with the purpose of disabling it for submission, but should be enabled for related-entities-search on item pages
  • CSV export ignored fixedFilter on the PaginatedSearchOptions import when creating the process

Instructions for Reviewers

Changes made:

  • Enabled CSV export through related-entities-search component, making the button available again on item pages
  • Parsed the fixedFilter to a -f parameter (in the expected format) on the process

How to test:

  • Log in as administrator
  • Visit an entity page containing related entities
  • Verify the csv export button is visible on the related entities search at the top-right of the results
  • Click the export button
  • Verify the exported results contains the correct items

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes TSLint validation using yarn run lint
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs for any bug fixes, improvements or new features. A few reminders about what constitutes good tests:
    • Include tests for different user types (if behavior differs), including: (1) Anonymous user, (2) Logged in user (non-admin), and (3) Administrator.
    • Include tests for error scenarios, e.g. when errors/warnings should appear (or buttons should be disabled).
    • For bug fixes, include a test that reproduces the bug and proves it is fixed. For clarity, it may be useful to provide the test in a separate commit from the bug fix.
  • If my PR includes new, third-party dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.

@tdonohue tdonohue added bug tools: export 1 APPROVAL pull request only requires a single approval to merge port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Jul 13, 2023
@tdonohue tdonohue added this to the 8.0 milestone Jul 13, 2023
@tdonohue tdonohue modified the milestones: 8.0, 7.6.1 Jul 26, 2023
@tdonohue tdonohue self-requested a review July 27, 2023 14:43
@pilasou
Copy link
Contributor

pilasou commented Aug 7, 2023

@tdonohue +1 I have tested this PR and everyting works as described: when not authenticated, CSV export is provided when doing a public search but not on entity pages where searches are available (i.e. person or Orgunits). When authenticated as an admin, the CSV export button appears on the upper right of the search section (see image below).
image

When exported, the CSV contains the correct items in standard DSpace CSV format.

I have conducted 2 tests using the assetstore data provided by DSpace for testing : one on a person entity page (Simmons, Cameron ; doing a search on term "protocol" ; 5 results on page, 5 results in CSV) and another on a orgUnit page (Law enforcement ; 2 results on page ; 2 results in CSV).

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @Atmire-Kristof ! Apologies for the delay in getting back to this. I've verified this works as well & appreciate @pilasou 's detailed tests.

@tdonohue tdonohue merged commit f542461 into DSpace:main Sep 6, 2023
@dspace-bot
Copy link
Contributor

Successfully created backport PR for dspace-7_x:

@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label Sep 6, 2023
@tdonohue tdonohue modified the milestones: 7.6.1, 8.0 Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge bug tools: export
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants