Ticket #193 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Entering too long text results in unrecognizable error

Reported by: e.vansomeren@… Owned by: e.vansomeren@…
Priority: minor Milestone:
Component: General Version:
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

While editing a study, I tried to fill in a study description that consisted of several sentences. This results in an error when you click next (see below). I assume it is unrelated to editting, but related to the number of characters entered (I tried different lengths and quicksaving until I got an error.

This length still worked:
Rat has been treated with different compounds with the purpose of investigating toxicological mechanisms. Three toxic (ANIT, DMN, NMF) and 3 non-toxic (Caerulein, dinitrophenol, Rosiglitazone) compounds have been administered in 5-plicates.

in a dialog:
exception → org.springframework.dao.DataIntegrityViolationException?: Could not execute JDBC batch update; SQL [update study_template_string_fields set template_string_fields_elt=? where study_id=? and template_string_fields_idx=?]; nested exception is org.hibernate.exception.DataException?: Could not execute JDBC batch update, see log for stacktrace

Change History

Changed 3 years ago by business@…

  • owner set to robert@…
  • status changed from new to assigned

For a moment, I feared that this #50 all over again!
But fortunately I saw that you created a custom template with a STRING field instead of a TEXT field. STRING fields can only contain up to 255 characters. This should be made more clear in the template editor.

Changed 3 years ago by robert@…

  • owner changed from robert@… to e.vansomeren@…

I've added a hint in the template editor that string fields can only contain up to 255 characters. I've also created a ticket (#198) to improve error messages.

Please test this issue again and set to 'resolve as fixed' if you are satisfied with this solution.

Changed 3 years ago by e.vansomeren@…

A hint in the template editor is nice, but it would be better to give this hint to the user that is filling in information. Furthermore, when creating a new experiment no error is given when going to the next step, so the user will only find out at the very end! Would it be possible to check length at the same time when you check if a required field is filled in (and do this when clicking next)?

Changed 3 years ago by robert@…

  • owner changed from e.vansomeren@… to robert@…

I'll take a look at it.

Changed 3 years ago by robert@…

  • owner changed from robert@… to e.vansomeren@…

I've added an error message when exceeding the length of 255 characters. The error should still be made more user friendly, but that's in scope of ticket #198.

The message when filling in the field should be added in the template editor in the field 'comment' of a template field. That way, the user gets the message when clicking on the question mark next to the input field (as is also done with the start- and endtime of an event)

Changed 3 years ago by e.vansomeren@…

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

Great, the error and subsequent red ! clearly indicates which field has problems. I think the solution of adding a remark about 255 characters in the "comment" would be enough for the user to put 1 and 1 together. Ticket #198 will make it perfect.

Note: See TracTickets for help on using tickets.