acadsamplesdb / acad_samples

ACAD samples database
0 stars 0 forks source link

DNA yield in Extraction results needs 2 decimal places #21

Closed sgoodswen closed 8 years ago

sgoodswen commented 8 years ago

In the Lab extractions tab when entering sample details you are only able to enter a whole number for DNA yield. Please change this to accept up to 2 decimal places.

Li-ReDBox commented 8 years ago

DNA yield is defined as PositiveIntegerField. The proposed change will change the database scheme.

sgoodswen commented 8 years ago

This also a problem in the Lab Amplification tab when entering extraction result details you are only able to enter a whole number for DNA yield. Please change this to accept up to 2 decimal places.

Li-ReDBox commented 8 years ago

If we use decimalfield, you have to define the maximal allowed digits. How many do you want?

sgoodswen commented 8 years ago

5 digits e.g. 000.00 (i.e. 3 digits before 2 decimal places)

Li-ReDBox commented 8 years ago

Do you want dna yield EnrichmentResult to be changed to decimal type too?

Li-ReDBox commented 8 years ago

EnrichmentResult should also be changed for consistence after discussion.

sgoodswen commented 8 years ago

If you enter more than 2 decimal places the program correctly warns with a "Please select a valid value" message. However, if more than 3 digits precede the decimal point e.g. 1000 or 1000.33 no message is displayed (although the program correctly does not respond to the [submit] button).

Li-ReDBox commented 8 years ago

I used Firefox and Chromium and I had error message. This one is of them: screenshot from 2016-03-31 12 03 40

Did you use Safari? I have not changed any error handling which is from the base library. Have you seen any error messages before in any forms?

sgoodswen commented 8 years ago

I am using Firefox 45.0.1 on a Mac. For the DNA yield I only see this type of error:

screen shot 2016-03-31 at 1 31 58 pm

Li-ReDBox commented 8 years ago

@sgoodswen it looks like a reasonable response even it is not in red. Not sure why it has different colours for errors.

sgoodswen commented 8 years ago

I still do not get an error if more than 3 digits precede the decimal point e.g. 1000 or 1000.33

Li-ReDBox commented 8 years ago

If you cannot save changes with invalid data, that means validation works. If you cannot save but you cannot see error message, and it happens in majority browsers, then we have to do more tests and maybe finish this later given the limited available time .

sgoodswen commented 8 years ago

I confirm that you cannot save changes with invalid data e.g. 1000 or 1000.33, and this is what we want. However, for the record I do not see any error messages when using a Mac and Firefox, Windows 7 and Firefox, or Windows 7 and Internet explorer 11 when entering either1000 or 1000.33 I also confirm that the actual reported issue .i.e. “DNA yield in Extraction results needs 2 decimal places” has been fixed and therefore this issue can be closed


From: Li-ReDBox [notifications@github.com] Sent: Friday, 1 April 2016 11:17 AM To: acadsamplesdb/acad_samples Cc: Stephen Goodswen Subject: Re: [acadsamplesdb/acad_samples] DNA yield in Extraction results needs 2 decimal places (#21)

If you cannot save changes with invalid data, that means validation works. If you cannot save but you cannot see error message, and it happens in majority browsers, then we have to do more tests and maybe finish this later given the limited available time .

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHubhttps://github.com/acadsamplesdb/acad_samples/issues/21#issuecomment-204193573

Li-ReDBox commented 8 years ago

Thank @sgoodswen very much for doing the confirmations on different browsers. It is bad that user could not get good response if using certain browsers but at least the software does not allow un-wanted data pass.

sgoodswen commented 8 years ago

This issue has been fixed