phpreport
phpreport copied to clipboard
Error saving task when text on story field too long
[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
- For example
- 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.
[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.
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.
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.
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.