You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the column header in sample manifests, from DATE OF SAMPLE COLLECTION (YYY-MM-DD) to DATE OF SAMPLE COLLECTION (YYYY-MM-DD).
This change would be across all sample manifest types
Tests would need to be performed for existing sample manifests with the old text YYY, as well as new sample manifests with the new text YYYY, to ensure they are both supported.
Additional context
(Further information from Andrew)
See config/sample_manifest_excel/columns.yml in SS
The date_of_sample_collection column is defined twice with two different header texts:
date_of_sample_collection:
heading: DATE OF SAMPLE COLLECTION (YYYY-MM-DD)
unlocked: true
validation:
options:
type: :custom
formula1: 'IF(OR(EXACT(A1,"not collected"),EXACT(A1,"not provided"),EXACT(A1,"restricted access")), TRUE, AND((_xlfn.NUMBERVALUE(LEFT(A1,4))>0),OR(LEN(A1)=4,EXACT(MID(A1,5,1),"-")),OR(LEN(A1)<=7,EXACT(MID(A1,8,1),"-")),AND((_xlfn.NUMBERVALUE(MID(A1,6,2))>=0),(_xlfn.NUMBERVALUE(MID(A1,6,2))<=12)),AND((_xlfn.NUMBERVALUE(MID(A1,9,2))>=0),(_xlfn.NUMBERVALUE(MID(A1,9,2))<=31))))'
allowBlank: false
showInputMessage: true
promptTitle: "Sample Collection Date"
prompt: "Date should be in the format YYYY-MM-DD, Partial dates are supported. eg. YYYY or YYY-MM. See https://ena-docs.readthedocs.io/en/latest/submit/samples/missing-values.html if you can't provide a value."
showErrorMessage: true
errorStyle: :stop
errorTitle: "Sample Collection Date"
error: "Date should be in the format YYYY-MM-DD, Partial dates are supported. eg. YYYY or YYY-MM. See https://ena-docs.readthedocs.io/en/latest/submit/samples/missing-values.html if you can't provide a value."
conditional_formattings:
empty_mandatory_cell:
date_of_sample_extraction:
heading: DATE OF DNA EXTRACTION (MM/YY or YYYY only) <--- different header
unlocked: true
validation:
options:
type: :textLength
operator: :lessThanOrEqual
formula1: "5"
allowBlank: false
showInputMessage: true
promptTitle: "Sample Collection Date"
prompt: "Please Enter either a Month and Year or a complete Year e.g. 04/05 or 2004."
showErrorMessage: true
errorStyle: :stop
errorTitle: "Sample Collection Date"
error: "This must be either a combination of month and year, or a whole year, with no spaces."
conditional_formattings:
empty_cell:
len:
formula:
operator: ">"
operand: 5
I think the way it works on upload is it looks for a column definition with a matching header, and uses that definition.
So if you create 2 column definitions, one with YYY and one with YYYY, you could solve your issue that way.
NB. I have had a silent error before where 2 different columns had the exact same header text, and it used the first it found in the list (the wrong column definition). So check for uniqueness of column headers if you change this file, or if you introduce a regex that ignores things in brackets.
NB. there's a copy in the spec directory too, update that if you change anything. spec/data/sample_manifest_excel/columns.yml
The text was updated successfully, but these errors were encountered:
psd-issuerbot
changed the title
Fix typo in Sample Manifest column header
Y24-332 - Fix typo in Sample Manifest column header
Sep 20, 2024
Might be worth deciding if it is something we want to fix as it is aesthetic? If a user does enter a wrong date then it does error. I must admit I have created a few manifests and never noticed.
Describe the Housekeeping
Update the column header in sample manifests, from
DATE OF SAMPLE COLLECTION (YYY-MM-DD)
toDATE OF SAMPLE COLLECTION (YYYY-MM-DD)
.This change would be across all sample manifest types
Tests would need to be performed for existing sample manifests with the old text
YYY
, as well as new sample manifests with the new textYYYY
, to ensure they are both supported.Additional context
(Further information from Andrew)
See
config/sample_manifest_excel/columns.yml
in SSThe
date_of_sample_collection column
is defined twice with two different header texts:I think the way it works on upload is it looks for a column definition with a matching header, and uses that definition.
So if you create 2 column definitions, one with YYY and one with YYYY, you could solve your issue that way.
NB. I have had a silent error before where 2 different columns had the exact same header text, and it used the first it found in the list (the wrong column definition). So check for uniqueness of column headers if you change this file, or if you introduce a regex that ignores things in brackets.
NB. there's a copy in the spec directory too, update that if you change anything.
spec/data/sample_manifest_excel/columns.yml
The text was updated successfully, but these errors were encountered: