You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm going to start with the consequence of the bug and then explain the possible cause, maybe.
Projects are not linked to a person's profile project tab when the project metadata crisrp.investigator and crisrp.coinvestigator are filled with an authority.
I will assume the DSpace CRIS demo page has the same bug that I have in my personal DSpace instance. For example, the project DSpace-CRIS has two people with profiles, Bollini, Andrea and Mornati, Susanna, but their profile pages don't have the DSpace-CRIS project linked to them. There should be a "Projects" tab.
To Reproduce
Steps to reproduce the behavior (assuming inside a debug environment):
Create a person profile inside DSpace.
Create a project inside DSpace and add the person as the principal investigator.
Put a debug breakpoint at line 212 inside ItemIndexFactoryImpl.java (This class is responsible for the creation of Solr fields associated with discovery.xml filters).
Run an ./dspace index-discovery -b process to rebuild the Solr index.
Inspect the discoveryConfigurations object.
The variable discoveryConfigurations contains all the configurations inside discovery.xml, but I noticed that, for some reason, there are two project configurations. Now ItemIndexFactoryImpl.java, when running its addDiscoveryFields() method, seems to handle the case of duplicated configurations by using the hash set appliedConf when cycling through all the configurations.
The problem is that there are duplicated project configurations that have different sets of searchFilters.
For my case, the first project configuration has only 5 searchFilters, but the second has 8. One of the filters missing from the first configuration is searchFilterProjectInvestigator which create the Solr index field projectinvestigator:
Now, because ItemIndexFactoryImpl.java applied the first incomplete project configuration and skipped the second one, a person's projects will not be linked to their profile pages.
A special note should be that this problem will not happen if the order of configurations is inverted.
Expected behavior
Discovery configurations with the same ID should be identical and not have different attributes that can cause unexpected random behavior.
I hope this may explains the problem with unlinked person projects
Related work
None for the moment.
The text was updated successfully, but these errors were encountered:
Describe the bug
DSpace version: 2023.02.06
I'm going to start with the consequence of the bug and then explain the possible cause, maybe.
Projects are not linked to a person's profile project tab when the project metadata
crisrp.investigator
andcrisrp.coinvestigator
are filled with an authority.I will assume the DSpace CRIS demo page has the same bug that I have in my personal DSpace instance. For example, the project DSpace-CRIS has two people with profiles, Bollini, Andrea and Mornati, Susanna, but their profile pages don't have the DSpace-CRIS project linked to them. There should be a "Projects" tab.
To Reproduce
Steps to reproduce the behavior (assuming inside a debug environment):
discovery.xml
filters)../dspace index-discovery -b
process to rebuild the Solr index.discoveryConfigurations
object.The variable
discoveryConfigurations
contains all the configurations inside discovery.xml, but I noticed that, for some reason, there are twoproject
configurations. Now ItemIndexFactoryImpl.java, when running itsaddDiscoveryFields()
method, seems to handle the case of duplicated configurations by using the hash setappliedConf
when cycling through all the configurations.The problem is that there are duplicated
project
configurations that have different sets ofsearchFilters
.For my case, the first
project
configuration has only 5searchFilters
, but the second has 8. One of the filters missing from the first configuration issearchFilterProjectInvestigator
which create the Solr index fieldprojectinvestigator
:DSpace/dspace/config/spring/api/discovery.xml
Line 2892 in 2c26aca
This filter appears in the second
project
configuration:The missing
searchFilter
is used by the query relationInvestigatorProjectsConfiguration, which lists all the person's projects.Now, because
ItemIndexFactoryImpl.java
applied the first incomplete project configuration and skipped the second one, a person's projects will not be linked to their profile pages.A special note should be that this problem will not happen if the order of configurations is inverted.
Expected behavior
Discovery configurations with the same ID should be identical and not have different attributes that can cause unexpected random behavior.
I hope this may explains the problem with unlinked person projects
Related work
None for the moment.
The text was updated successfully, but these errors were encountered: