Ticket #305 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Validation in import wizard still fails in some cases

Reported by: business@… Owned by: jannekevdp@…
Priority: major Milestone: 0.6.5
Component: Import wizard Version: 0.6.3
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

I tested the import of NTC_experiment_test4.xls (see #278) on ci.nmcdsp.org by uploading the file, let the proposed matching in the mapping step unaltered and then correct all the red boxes in step 3. I still ran into 2 problems with the validators:

- if I enter just one number into a date field, I still get an exception:

Stacktrace follows:org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing org.codehaus.groovy.grails.webflow.engine.builder.ClosureInvokingAction@254daec1 in state 'pageThree' of flow 'importer/pages' -- action execution attributes were 'map[[empty]]'
     at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
     at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
     at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
     at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
     at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
     at java.lang.Thread.run(Thread.java:662)
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '8' with class 'java.lang.String' to class 'java.util.Date'
     at org.dbnp.gdt.Identity.setProperty(Identity.groovy)
     at org.dbnp.gdt.TemplateEntity.setFieldValue(TemplateEntity.groovy:573)
     at org.dbnp.gdt.TemplateEntity$setFieldValue.call(Unknown Source)
     at dbnp.importer.ImporterController$_mappingsPage_closure7_closure38_closure39.doCall(ImporterController.groovy:449)
     at dbnp.importer.ImporterController$_mappingsPage_closure7_closure38.doCall(ImporterController.groovy:422)
     at dbnp.importer.ImporterController$_mappingsPage_closure7.doCall(ImporterController.groovy:418)
     at dbnp.importer.ImporterController.mappingsPage(ImporterController.groovy:417)
     at dbnp.importer.ImporterController$_closure2_closure16_closure29.doCall(ImporterController.groovy:190)
     ... 6 more

Never trust user input, even if a date picker popup is shown!

- for some strange reason StudyID and Study Title are not validated even if they seem to be correctly filled. See screenshots.

Attachments

Schermafbeelding 2011-02-04 om 13.40.50.png Download (71.9 KB) - added by business@… 3 years ago.
Schermafbeelding 2011-02-04 om 13.42.04.png Download (43.3 KB) - added by business@… 3 years ago.
screenshot1.PNG Download (11.8 KB) - added by jannekevdp@… 3 years ago.

Change History

Changed 3 years ago by business@…

Changed 3 years ago by business@…

Changed 3 years ago by business@…

  • milestone set to 0.6.4

Changed 3 years ago by jannekevdp@…

  • status changed from new to assigned
  • component changed from Unknown to Import wizard

-StudyID and Study Title are validated correctly

-popup appears if submissionDate is not filled in correctly

-However, if StartDate? is invalid (e.g. a number instead of date) 'next' is not possible (link not working). Previous is possible.
I changed the number into date and proceeded. Then the next screen appeared (screenshot)

Changed 3 years ago by jannekevdp@…

Changed 3 years ago by work@…

  • owner changed from business@… to t.w.abma@…

Changed 3 years ago by jannekevdp@…

Just filled in number, instead of date in StartDate?; Importer is indicating missing fields, but the field is not colored in red.

Changed 3 years ago by t.w.abma@…

  • owner changed from t.w.abma@… to jannekevdp@…

Added an extra check in the mappings step which now doesn't break the importer when someone is trying to enter a non-date value in a date field. It would perhaps also be nice if there is also some extra validation on the GUI-side that it's not possible to enter a non-date value in a date field. Please confirm it works now.

Changed 3 years ago by business@…

  • status changed from assigned to closed
  • resolution set to fixed

Changed 3 years ago by jannekevdp@…

Indeed it recognizes a number as empty field

Note: See TracTickets for help on using tickets.