phpreport icon indicating copy to clipboard operation
phpreport copied to clipboard

Error saving task when text on story field too long

Open jaragunde opened this issue 9 years ago • 4 comments

[Trac import] Reported by: clopez Original date: Monday, 26 March 2012 18:22

Steps to reproduce:

  • Create a new task on an empty day
  • Input a long text on the ''Story'' field
    • For example qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm
  • Try to save it and you will get error. The problem is that the error is not descriptive about what is going on:

    error Some Error Occurred While Saving The Changes (please check you haven't clipped working hours)

Either improve the error to say that the text on story field is too long or auto-trim it.

jaragunde avatar Mar 09 '16 10:03 jaragunde

[Trac import] Comment by: jaragunde Original date: Thursday, 29 March 2012 18:36

The issue with the lack of feedback when an error happens is being tracked on ticket #173.

jaragunde avatar Mar 09 '16 10:03 jaragunde

Recent work in #173 and #496 mean that the error message is more specific now, albeit a bit too technical:

Task update failed: ERROR: 22001: value too long for type character varying(80) LOCATION: varchar, varchar.c:632

I think a character limit is something worth having a specific error message for.

jaragunde avatar Mar 23 '23 15:03 jaragunde

I agree that this one is probably worth a specific message. Since we are starting to accumulate more cases of these, would it make sense at some point to have an ErrorParser.php that's more global? Then we could define the most common error types to handle and a consistent message to pass back.

That might be an extra abstraction that we don't need, though. Just thinking out loud.

dmtrek14 avatar Mar 23 '23 16:03 dmtrek14

We are in the process of rewriting the frontend for tasks. Any outstanding bugs and enhancements for the old interface will be taken into account as we implement the new design.

New frontend validation should be able to help with this so that something too long gets flagged before it evens gets to the backend.

dmtrek14 avatar Sep 01 '23 15:09 dmtrek14