BiologicalRecordsCentre / UKBMS-online

Issue tracking for UKBMS online recording site
2 stars 0 forks source link

Compulsory Fields on Data Entry page #212

Closed MeganLowe closed 2 years ago

MeganLowe commented 3 years ago

Hello, please can we make the following fields compulsory (in addition to the ones that currently are) on the first page of data entry for all transects/WCBS-BC/WCBS-BBS:

And make the % sun fields compulsory on the second page of data entry (where the species are listed). Is it also possible to put a limit on this so people can't enter more than 100? And lastly, these % sun fields on the second page need looking at as they don't appear to be saving when values are entered. Thank you, Megan

IanMiddlebrook commented 3 years ago

Hi @Gary-van-Breda @DavidRoy On Megan's final point of the section % sun fields on the data entry page, it seems that they are saving to the database (according to downloads), but are not displaying on the data entry page when re-visiting the page.

Gary-van-Breda commented 3 years ago

@DavidRoy : can you confirm you are happy with the compulsory fields? Do we have to import any data which does not have the end time?

DavidRoy commented 3 years ago

@Gary-van-Breda yes to compulsory fields. Yes, we may have to import data without and end time. Is there an option for a missing value code?

Gary-van-Breda commented 3 years ago

Currently there is no such option. This is further complicated by the warehouse caching this configuration, and there being no way to clear this cache: this means we can not just switch off the mandatory flag when we want to do an import, and then switch it back on again afterwards.

Gary-van-Breda commented 3 years ago

See comment https://github.com/BiologicalRecordsCentre/UKBMS-online/issues/125#issuecomment-623380182

Gary-van-Breda commented 2 years ago

Note for self: can set the end date as compulsory on the front page using form config

Gary-van-Breda commented 2 years ago

Missing %Sun dealt with under #221 (now closed) %Sun is now optional on main walk tab/page, and mandatory on Species tab/page (all 3 surveys) Start time is mandatory as defined in warehouse, so is mandatory for data uploads (all 3 surveys) End time is now mandatory on the Form, not the warehouse, so can be omitted in data uploads (all 3 surveys)

@DavidRoy : Do we actually want to put this number limit on the species count entries? I thought we already had something in place for this (see #62).

IanMiddlebrook commented 2 years ago

Hi @Gary-van-Breda @DavidRoy - the limit suggested here is for the %sun field, rather than species counts. Some recorders accidentally put 1000 or 900 etc as a section %sun, but it should never be more than 100.

Thanks, Ian

Gary-van-Breda commented 2 years ago

@IanMiddlebrook @MeganLowe @DavidRoy : Validation now enforced on %Sun on species grid. Deployed to Test for review.

MeganLowe commented 2 years ago

Hi @Gary-van-Breda validation on %sun value works well. I noted though that if you type nothing at all in any of the %sun fields then it still allows you to proceed to save with no flag to say that the field is required. Also, start time isn't showing as a mandatory field for WCBS-BC or BBS on test or live, but is for Transects? Thanks, Megan

Gary-van-Breda commented 2 years ago

Hi @MeganLowe I've cleared the cache on Test, so that should now be showing the start times as required for BC and BBS. When I put nothing in to a %Sun on the species grid I am shown an error message. What do you mean about "proceeding to save"?

MeganLowe commented 2 years ago

Hi @Gary-van-Breda sorry by 'proceed to save' I mean when I select 'finish and return to walk list'. I've made a quick video of what I mean below - as you can see if I don't click or enter anything in any of the %sun fields no error message seems to appear?

https://user-images.githubusercontent.com/64081219/153411826-6753d264-0f12-4745-b7b3-db985c0f54df.mp4

Gary-van-Breda commented 2 years ago

@MeganLowe and FYI @DavidRoy @IanMiddlebrook I have changed the form so that the user has to enter any mandatory section level attributes (%Sun) before they are allowed to enter any species counts, add a species to the grids using the autocompletes, or for new walks, use the Finish button. Any empty mandatory section data is now highlighted when the species grid page is displayed, and a dialogue explaining the situation is displayed (only if needed).

Deployed to the Test site for review.

MeganLowe commented 2 years ago

Looks good @Gary-van-Breda thank you.

Gary-van-Breda commented 2 years ago

Deployed to Live. Closing