[GeoNetwork-devel] Metadata update service in GN 3.0 can't distinguish between Save and Save&Close

Hi

In 2.10 versions, the metadata update service used when saving and close got a parameter call finished to distinguish this case from just a save of the form.

In GeoNetwork 3 that seem not the case with the new editor, the Update service still uses the finished parameter (see https://github.com/geonetwork/core-geonetwork/blob/3.0.x/services/src/main/java/org/fao/geonet/services/metadata/Update.java#L84) , but at least if using the AngularUI it’s not used.

I found these services are defined and none of them sending that parameter:

  • md.edit.save: Seem used when clicking Save button.

  • md.edit.saveonly: Seem used when clicking Save&Close button, but also seem used when saving the form sending a refresh param to true (not clear when this is used)

  • md.edit.save.and.close: Seem not used in the Angular editor at least.

2 questions:

  1. Is it reliable to check the service name in the Update service to distinguish between Save (md.edit.save) and Save&Close (md.edit.saveonly), otherwise what to use if need to execute some code only on Save&Close.

I doubt it’s reliable previous assumption, after seeing this code: https://github.com/geonetwork/core-geonetwork/blob/3.0.x/web-ui/src/main/resources/catalog/components/metadatamanager/EditorService.js#L125

  1. What about the specific code in Update service that depends on that parameter: https://github.com/geonetwork/core-geonetwork/blob/3.0.x/services/src/main/java/org/fao/geonet/services/metadata/Update.java#L129

Seem then the metadata in the edit session is not cleaned.

Anybody has an idea about this bizarre change and can be solved?

Regards,
Jose García

···

Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: +31 (0)318 416664

Please consider the environment before printing this email.