@@ -138,7 +138,7 @@ Ext4.define('MCC.panel.MccImportPanel', {
138138 expectInImport : true
139139 } , {
140140 name : 'availability' ,
141- // NOTE: availalble was a typo in one generation of the input templates:
141+ // NOTE: available was a typo in one generation of the input templates:
142142 labels : [ 'Available to Transfer' , 'available to transfer' , 'available to transfer' ] ,
143143 allowRowSpan : false ,
144144 allowBlank : true ,
@@ -396,7 +396,7 @@ Ext4.define('MCC.panel.MccImportPanel', {
396396 getPanelItems : function ( ) {
397397 return [ {
398398 style : 'padding-top: 10px;' ,
399- html : 'This page is designed to help import MCC animal-level data. Use the fields below to download the excel template and paste data to import.<p>'
399+ html : 'This page is designed to help import MCC animal-level data. Use the fields below to download the excel template and paste data to import. The general idea is: 1) Download a blank excel template. This excel workbook contains dropdowns, etc., 2) Use the second button to download a table with the current data for the selected colony. 3) Copy/paste that raw data into the template. <p>'
400400 } , {
401401 layout : 'hbox' ,
402402 style : 'margin-bottom: 20px;' ,
@@ -424,27 +424,26 @@ Ext4.define('MCC.panel.MccImportPanel', {
424424 'Id/mccAlias/externalAlias' : 'MCC_ID' ,
425425 'Id' : 'Center Id' ,
426426 'alternateIds' : 'Previous IDs' ,
427- 'colony' : 'Colony' ,
427+ 'colony' : 'Current Colony' ,
428+ 'source' : 'Source Colony' ,
428429 'gender' : 'Sex' ,
429430 'birth' : 'Birth' ,
430431 'calculated_status' : 'status' ,
431432 'Id/MostRecentDeparture/destination' : 'Shipping Destination' ,
432- 'Id/MostRecentDeparture/MostRecentDeparture' : 'Most Recent Departure Date' ,
433+ 'Id/MostRecentDeparture/MostRecentDeparture' : 'Shipping Date' ,
433434 'death' : 'Death' ,
434- 'deathCause' : 'Cause of death ' ,
435- 'dam' : 'Dam ' ,
436- 'sire' : 'Sire ' ,
435+ 'deathCause' : 'Cause of Death ' ,
436+ 'dam' : 'Material ID ' ,
437+ 'sire' : 'Paternal ID ' ,
437438 'Id/MostRecentWeight/MostRecentWeightGrams' : 'Weight (g)' ,
438439 'Id/MostRecentWeight/MostRecentWeightDate' : 'Date of Weight' ,
439- 'u24_status' : 'U24 assigned? ' ,
440+ 'u24_status' : 'U24 Status ' ,
440441 'Id/mostRecentObservations/availability::observation' : 'Availability' ,
441442 'Id/mostRecentObservations/current_housing_status::observation' : 'Current Housing Status' ,
442443 'breeding partner ID' : 'Breeding Partner ID' ,
443444 'Id/mostRecentObservations/infant_history::observation' : 'Infant History' ,
444445 'Id/mostRecentObservations/fertility_status::observation' : 'Fertility Status' ,
445- 'Id/mostRecentObservations/medical_history::observation' : 'Medical History' ,
446- 'Id/mostRecentObservations/usage_current::observation' : 'Usage (Current)' ,
447- 'Id/mostRecentObservations/usage_future::observation' : 'Usage (Future)'
446+ 'Id/mostRecentObservations/medical_history::observation' : 'Medical History'
448447 }
449448
450449 LABKEY . Query . selectRows ( {
@@ -463,7 +462,10 @@ Ext4.define('MCC.panel.MccImportPanel', {
463462 const rows = results . rows . map ( row => {
464463 const newRow = [ ]
465464 Object . keys ( fieldMap ) . forEach ( key => {
466- if ( row [ key ] !== undefined ) {
465+ // Always leave these empty:
466+ if ( key === 'Id/MostRecentWeight/MostRecentWeightGrams' || key === 'Id/MostRecentWeight/MostRecentWeightDate' ) {
467+ newRow . push ( '' )
468+ } else if ( row [ key ] !== undefined ) {
467469 newRow . push ( Ext4 . isArray ( row [ key ] ) ? row [ key ] . join ( ',' ) : row [ key ] )
468470 } else {
469471 newRow . push ( '' )
0 commit comments