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

Fix counts of works and collections on a user's show page - #5568 #6087

Conversation

bkiahstroud
Copy link
Contributor

Fixes

Ref

Summary

Fix counts of works and collections on a user's show page

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  1. Login as an admin who has not created any Works or Collections
  2. Navigate to Dashboard > Works
  3. Create two works
  4. Navigate to Dashboard > Collections
  5. Create one new Collection
  6. Navigate to the homepage (/)
  7. Under the Recently Uploaded tab, click your user's email next to Depositor
  8. Observe the numbers In the lefthand sidebar. The number of Collections created should be 1. The number of Works created should be 2.

Type of change (for release notes)

  • Major Changes (Potentially breaking changes)
  • New Features
  • Deprecations
  • Bug Fixes
  • Valkyrie Progress
  • Documentation
  • Containerization

Detailed Description

Use the #with_generic_type method instead of hard-coding the Generic Type Solr field until this issue is resolved:

See that ticket for more details on why this bug was happening.

Changes proposed in this pull request:

  • Remove where param from #number_of_works in favor of #with_generic_type
  • Add #with_generic_type filters to #number_of_collections and #number_of_files
  • Update specs accordingly

@samvera/hyrax-code-reviewers

Use the `#with_generic_type` method instead of hard-coding the Generic Type Solr field until this issue is resolved:

- #6086

See that ticket for more details on why this bug was happening.
@bkiahstroud bkiahstroud linked an issue Jun 2, 2023 that may be closed by this pull request
@alishaevn alishaevn merged commit d9484f9 into main Jun 5, 2023
@alishaevn alishaevn deleted the i5568-user-profile-page-displays-wrong-counts-for-collections-and-works branch June 5, 2023 17:58
@dlpierce dlpierce added the notes-valkyrie Release Notes: Valkyrie specific label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-valkyrie Release Notes: Valkyrie specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User profile page displays wrong count for collections and works
3 participants