core-geonetwork icon indicating copy to clipboard operation
core-geonetwork copied to clipboard

Multiple issues with Contacts in Default (and List) metadata view

Open ByronCinNZ opened this issue 1 year ago • 0 comments

Describe the bug The default metadata view "Contacts for Resource" and "Metadata information - Point of Contact" section have several related bugs (ISO 19115-3 metadata) -

  1. When the contact is a CI_Individual rather than a CI_Organisation, no information is displayed. The circle is empty, but the popup shows information. image
  2. Clicking on the filter option in the contact popup returns no results image
  3. We have been asked that the placement of the Initial for the Contact in the circle be centred.

To Reproduce Steps to reproduce the behaviour:

  1. In GeoNetwork 4.2.x search for a ISO19115-3 metadata record containing CI_Individual contact information
  2. Click on this record to view in "Default" mode
  3. Scroll down to "Contact for the resource"
  4. Click on a contact and and select "Focus on resources from (contact)"

Expected behavior The desired "Default" metadata view would look like this - image

When selecting "Focus on resources from (contact)", the resulting search should return something like this - image

Desktop (please complete the following information):

  • Browser - firefox, chrome, safari
  • GeoNetwork Version 4.2.5
  • Server Application - Tomcat 9 with Java 8

Additional context We have applied the following fixes for your consideration -

  1. To fix the lack of CI_Individual contact information displayed, we changed line 1287 in the schema plugin iso19115-3.2018/index-fields/index.xsl as follows -
<xsl:variable name="organisationName"
                 select="(.//cit:CI_Organisation/cit:name)[1]"

to

<xsl:variable name="organisationName"
                  select="(.//*/cit:name)[1]"

As a result, both options (CI_Individual and CI_Organisation) allow the name field to be indexed.

This also fixed the same issue in List display image image

  1. We fixed the search filter problem by altering 3 lines in src/main/resources/catalog/components/search/mdview/partials/contact.html'. Occurrences of data-gn-search-filter-link="OrgForResource" were changed to data-gn-search-filter-link="OrgForResourceObject.default"

  2. To fix the placement of the initial for the Contact in the circle, in line 1350 of src/main/resources/catalog/components/utility/UtilityDirective.js we added dominant-baseline="middle" with the result being text-anchor="middle" dominant-baseline="middle" alignment-baseline="central"' +

ByronCinNZ avatar Jul 02 '24 23:07 ByronCinNZ