BiologicalRecordsCentre / eBMS

0 stars 0 forks source link

Reports Sample and Occurrences - Missing values in "*Site code" field #39

Closed xaviermestdagh closed 6 years ago

xaviermestdagh commented 7 years ago

Sample and Occurences reports have missing values in the field "Site Code". Some site do not have site code in the reports (e.g. no site code for 062_122 although Wanterfeld do have a site code).

xaviermestdagh commented 6 years ago

Hi, Two sites different sites are actually sharing the same Internal eBMS site code (EBMS:Luxembourg:51). In summary for this Issue:

Gary-van-Breda commented 6 years ago

Do the Codes themselves mean anything to you, other than their uniqueness? Do you mind if I reassign new codes to these sites?

Gary-van-Breda commented 6 years ago

I have set the code for 062_122 to EBMS:Luxembourg:5 I have set the code for 087_070 Waldbredimus to EBMS:Luxembourg:88 Sites "087_070 Waldbredimus" and "060_077" were created within a few seconds of each other, so used the same calculation for the next number.

xaviermestdagh commented 6 years ago

Thanks, sorry for not replying faster. At this stage and for me, site_code can be reassigned if required for your development and it can be numbers if required, no special meaning for me. Is it possible to ensure that uniqueness will be respected in the future?

Gary-van-Breda commented 6 years ago

@BirenRathod : can you deploy the following files to the EBMS Live Site? Thanks Issue39.zip

This moves the code calculation to the submission function, just before it is committed to the database, so should massively reduce the chance of duplication. Only slight downside is that during the creation of the site, the code will not be displayed in its final value, rather with the number replaced by "[INDEX]". After the initial save, the [INDEX] will be replaced with the correct calculated value.

BirenRathod commented 6 years ago

In which folder?

Gary-van-Breda commented 6 years ago

Code included in Issue 36 delivery: no point in deploying this separately.

Gary-van-Breda commented 6 years ago

@xaviermestdagh : code fix for this now deployed. Can you confirm you are happy with this: if so, this issue can be closed. Please note we still have an issue with the automatic country lookup on this form, as detailed in #33.

xaviermestdagh commented 6 years ago

great too for the site codes