ices-eg / wg_WGACOUSTICGOV

Working Group on Acoustic Trawl Data Portal Governance
http://ices.dk/community/groups/Pages/WGacousticgov.aspx
5 stars 1 forks source link

Unique “BiologyFishID” within SpeciesCode and HaulNumber #28

Closed SMLusseau closed 2 years ago

SMLusseau commented 2 years ago

Can we implement a check on upload to the database ensuring unique “BiologyFishID” within each SpeciesCode and HaulNumber?

HjalteParner commented 2 years ago

@SMLusseau we are currently implementing this check. Is it correctly understood that for a given haul you can have multiple catches potential also for the same species but all the individual fish for a given species within the haul need to have a unique fish ID no matter if they for some reason have been split into different catches?

HjalteParner commented 2 years ago

@SMLusseau we have now implemented this check as described above and it's now ready in our test environment https://acoustictest.ices.dk/submissions

Can you please check that the check is working as anticipated?

SMLusseau commented 2 years ago

@HjalteParner The FishID must be unique within HaulNumber, SpeciesCode and SpeciesCategory. There can be overlap between same species in the same haul as long as they are in different SpeceisCategory.

I have testet the implementation in the sandbox and it did not work as anticipated. I managed to upload a test file with one haul with only herring in, but 2 SpeciesCategory. In category 1 I duplicated one FishID (number 17) and this was allowed through the check. I downloaded the file successfully but it failed to upload in StoX (old) due to the duplicated FishID.

HjalteParner commented 2 years ago

@SMLusseau thanks! We will give it another shot and at the same time add the species category to the check.

CiaranOD commented 2 years ago

Implemented

CiaranOD commented 2 years ago

Implemented