openlibhums / imports

A plugin for importing content into Janeway.
GNU Affero General Public License v3.0
1 stars 2 forks source link

Exporting all articles - metadata field issue #99

Open S-Haime opened 1 month ago

S-Haime commented 1 month ago

Copied over from #4109 on JW repo. ////////////////////////////////

Describe the bug

There is an issue with the metadata fields, where a field has been deleted but the answer is still stored. This causes an error when trying to do an export, making it impossible to export metadata. If the answer was stored so that it contains the question itself, rather than the linked object this might resolve the issue. Additionally, this shouldn't be killing the export even if an answer is not found.

Janeway version

The version of Janeway under which the bug has been reproduced. If running off of master, please, indicate the current HEAD of the Janeway installation

To Reproduce

Steps to reproduce the behavior:

https://jcls.io/plugins/imports/articles/all/ Export all or Export CSV.

Additional context

Reported by jcls (ULB) FD 8101

S-Haime commented 1 month ago

Backlog refinement: We can do a quick-fix by adding a try / except check around the code that gets custom fields.

Longer term we might want to make sure answers are deleted when the question is deleted. Maybe, maybe not. What does it mean to delete a submission field? Need to discuss further.