AtlasOfLivingAustralia / biocache-store

Occurrence processing, indexing and batch processing
Other
7 stars 24 forks source link

fixed an issue about assertion_user_id #405

Closed alexhuang091 closed 3 years ago

alexhuang091 commented 3 years ago

Problems solved:

This commit fixed 2 issues:

  1. updateAssertionStatus(rowKey, qualityAssertion, systemAssertions, userAssertions :+ qualityAssertion) this qualityAssertion is already in the userAssertions and added again into it (this change was originally made in https://github.com/AtlasOfLivingAustralia/biocache-store/commit/13a68ee2ef4c7b16ce118ce417aaa72648408160) . Making the same assertions have 2 copies in the list. This is not necessary and causes issues.

In the below screen capture you can see same assertion appears twice

截屏2020-12-08 下午1 48 25
  1. Currently only outstanding user assertions (those not yet verified or verified as 50001) are saved into database and then used to generate assertion_user_id.

This commit added a new return value which contains all assertions users have made (what ever the status) and this list is used to generate 'assertion_user_id'.

What's affected:

When users access biocache-service/ws/occurrences/{occurrenceId} to get the detail of the occurrence record. the userQualityAssertions field is read out from the same database field so with changes in this commit, this field now contains all the user assertions instead of outstanding user assertions. And the duplicate issue mentioned above is solved.

nickdos commented 3 years ago

@alexhuang091 - Just wondering why this was closed before it was merged?

alexhuang091 commented 3 years ago

@alexhuang091 - Just wondering why this was closed before it was merged?

Hi Nick, Simon suggested me to commit changes to his branch so he do a PR when everything is done. He changed the idea and I've reopened it