Closed tdonohue closed 1 month ago
Hi @tdonohue, I've started testing phase. I've noticed that when item is withdrawn, the counter still include it. I've done some small fix for that. Can I push it directly to your branch?
@damian-joz : If GitHub allows you to push to my branch, then please feel free. If it doesn't allow you, then you could send me a PR to my branch (by creating at PR against my GitHub account: https://github.com/tdonohue/DSpace), or send me the code.
Thanks for testing & for finding a fix to the issue you discovered!
@tdonohue I've created a PR to your branch. I've also tested a few scenarios:
both for cache(Solr) and non cache solution(Database query) and it works fine. Sometimes it required the refresh of the UI.
Just one thing worth to mention, when we will map item to another collection we end up with something like this:
. And for some users it can be confusing because community counter is not even with the sum of collection counters. However it is ok because Collection 1 has 3 items with one item shared between collections.
I've merged the improvements that @damian-joz made in https://github.com/tdonohue/DSpace/pull/15 to this branch. Those are now included in this PR.
As @damian-joz has given approval (thanks!), I'll give this another test on my end to make sure everything still works well (after this most recent update). Assuming everything is working well, I'll get this merged for 8.0 and backported to 7.x
Backport failed for dspace-7_x
, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally and resolve any conflicts.
git fetch origin dspace-7_x
git worktree add -d .worktree/backport-9583-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-9583-to-dspace-7_x
git switch --create backport-9583-to-dspace-7_x
git cherry-pick -x 78f1e4190e0f48bc707416968033578d6ce12b9c d07aab6025a4e23be767146e03bc1964169c8a30 a4c297c94728d17081260e60cb0bc498d7f92a8d 01be5eee419b9d79192ed55a927a4b271a094bb0
References
Description
This PR refactors the
ItemCounter
andItemCountDAO
to be Spring beans defined incore-services.xml
. This fixes issues with Item Counts not reloading & issues where it was not possible to use live, database-based counts (viawebui.strengths.cache=false
).This refactor involved the following:
ItemCounter
andItemCountDAO
as beans incore-services.xml
ItemCountDAO
configuration fromdspace.cfg
as it is now configured viacore-services.xml
Context
object inItemCountDAO
. This resulted in database connection errors when the Context was outdatedcountArchivedItems()
methods fromCommunity
andCollection
as these were just wrappers around the same methods inCommunityService
andCollectionService
.ItemCountDAOFactory
andItemCountException
(the exception handling was updated to use log.error as otherwise item counting exceptions would crash the UI).Instructions for Reviewers
webui.strengths.show = true
andwebui.strengths.cache=true
on the backend. This tells the backend to use Solr for all Item Countswebui.strengths.show = true
andwebui.strengths.cache=false
on the backend. This tells the backend to use the Database for all Item counts.main
anddspace-7_x
they will throw errors as described in the ticket)