Thuenen-GeoNode-Development / thuenen_atlas

The Thünen Atlas GeoNode project
2 stars 1 forks source link

Decouple metadataset from user models #31

Open gannebamm opened 4 months ago

gannebamm commented 4 months ago

First described here: https://github.com/GeoNode/geonode/issues/11511#issuecomment-2196702015 In context of: https://github.com/zalf-rdm/geonode/issues/97 / https://github.com/GeoNode/geonode/issues/10342

Problem: One of the major issues we discovered is that metadata entries for publications (in terms of research) are static and must be static by design. The dynamic approach of GeoNode which saves user-objects to contacts is therefore against that principle. Here is an example to make this more clear:

Scientist sci-A works currently for organisation unit org-A. If sci-A uploads dataset data-A he/she will be listed as owner with his/her other contact infos like affiliation to org-A. Later sci-A switches to a new organisation unit like org-B. Due to the dynamic nature of GeoNodes metadata it will result in changed metadata if retrieved in the future for data-A.

Even though this is the prefered way to e.g. contact sci-A, this shall not happen from our point of view. It would for example change the list of datasets from org-A even though data-A was created while sci-A was part of it.

Idea: One briefly drafted idea was to use the new https://github.com/GeoNode/geonode/issues/12124 to save static metadata files per dataset. Additionally there is the "Metadata upload preserver" option to keep the original uploaded metadata file, and to avoid it being regenerated by GeoNode. as stated by Giovanni (https://github.com/GeoNode/geonode/issues/11511#issuecomment-2197159437).

Objective: We should discuss options to solve this issue

ridoo commented 3 months ago

Maybe this flag will make possible what you describe?! (will have to double-check)

Image

hvwaldow commented 3 months ago
vineetasharma105 commented 3 months ago

Characterize what the "fixed metadata flag" does when uploading XML file.

Once the 'Metadata uploaded preserve' check box is checked, then it does not allow any kind of updation of metadata from the frontend. Neither by (1.) 'edit Metadata' option nor by (2.) 'upload Metadata'.

  1. When the 'edit Metadata' option is clicked , the form for metadata editing display a warning note : "Note: this layer's orginal metadata was populated and preserved by importing a metadata XML file. This metadata cannot be edited." and the 'update/next' button at the lower part of the form is not available any more.
  2. When the 'upload Metadata' option is clicked, the form for metadata uploading , after choosing the xml file and clicking the 'upload files' , display error : "Unexpected error! - Unknwon Error Code. Contact the system administrator for more information regarding this error message. Additional info: [tuple.index(x): x not in tuple. Request: 1e592725-444d-438f-a75f-b0a4c755c0de. Request: 1e592725-444d-438f-a75f-b0a4c755c0de]"

Needless to say, these editing of metadata can be done/undone from Django admin after the check box 'Metadata uploaded' is checked off.

vineetasharma105 commented 3 months ago

Related: https://github.com/GeoNode/geonode/issues/11466 (this is dedicated more to kind of locking the metadata)

However, but does not solve the actual challenge to allow changes but in parallel have the content of the metadata non-related to changes to related entities like the user profile. Better solution would be to have the user profile as a fill-in help to copy the content to the metadata. This would keep the metadata editable.

vineetasharma105 commented 3 months ago

I did the test on 2 datasets and in nutshell the result is that I was able to change user details and it was reflected in ISO metadata after the 'metadata upload preserve' and 'metadata uploaded' was checked on and then (in order to be able to download ISO metadata) checked off . In the process, there are some points that were encountered. The screenshots will explain the steps that were followed and the results for it.

Image Image Image Image

ridoo commented 2 months ago

Waiting for Assets feature

ridoo commented 2 months ago

@kilichenko-pixida

gannebamm commented 1 month ago

@ahmdthr Please send the invitation for the sprint meeting at 30.10.2024, 3 pm to "Giovanni Allegri" giovanni.allegri@geosolutionsgroup.com

He will discuss with us the changes regarding metadata handling which are planned for GeoNode v5