Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 274912

Summary: Worklog: validate fields (Estimate, TimeSpent)
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Thomas Ehrnhoefer CLA 2009-05-04 19:01:47 EDT
Some validation would be great. Right now, the connector tries to parse (using the #m #h #d #w format), and if it fails will set it to 0.


Validation results could be displayed with control contributions, like

<code>
if (amountTextControlDecoration == null) {
			amountTextControlDecoration = new ControlDecoration(timeSpentText, SWT.TOP | SWT.LEFT);
			amountTextControlDecoration.setShowOnlyOnFocus(false);
			FieldDecoration errorImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
					FieldDecorationRegistry.DEC_ERROR);
			amountTextControlDecoration.setImage(errorImage.getImage());
			amountTextControlDecoration.setDescriptionText(Messages.WorkLogPart_Time_Spent_Error_Decorator_Hover);
		}
		if (invalid) {
			amountTextControlDecoration.show();
		} else {
			amountTextControlDecoration.hide();
		}
</code>
Comment 1 Thomas Ehrnhoefer CLA 2009-05-04 19:35:55 EDT

*** This bug has been marked as a duplicate of bug 274914 ***