Bug 303567 - [api] task attribute type for time duration
Summary: [api] task attribute type for time duration
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks: 329664
  Show dependency tree
 
Reported: 2010-02-22 18:38 EST by Robert Munteanu CLA
Modified: 2010-12-11 16:49 EST (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (2.96 KB, application/octet-stream)
2010-07-15 14:56 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2010-02-22 18:38:09 EST
When adding time tracking support for the Mantis connector I was hit by the fact that I want to display the elapsed time nicely formatted, but there is not TaskAttribute.TYPE_DURATION or similar. I've resorted to holding 2 pieces of information : the raw duration , in minutes, and the formatted duration.

Having a task attribute type defined in the framework would aid with such an use case.
Comment 1 Steffen Pingel CLA 2010-07-09 00:04:15 EDT
Great idea. Would you be interested in contributing that?
Comment 2 Robert Munteanu CLA 2010-07-14 16:56:49 EDT
Well, why not. Any pointers would be appreciated, as I have no idea where to start.
Comment 3 Steffen Pingel CLA 2010-07-15 14:56:32 EDT
The best way to start would be to look at subclasses of AbstractAttributeEditor. You would need to add a new type to TaskAttribute and extend AttributeEditorFactory to create the corresponding editor for the type. I have attached a context with some of the relevant classes.
Comment 4 Steffen Pingel CLA 2010-07-15 14:56:34 EDT
Created attachment 174434 [details]
mylyn/context/zip
Comment 5 Thomas Ehrnhoefer CLA 2010-12-10 10:50:33 EST
Duration seems to come in different formats depending on the connector kind (and maybe even configuration of the server). So I think this type_duration attribute editor needs to be read_only (as long as bug 242430 is not implemented) so that the connector can provide the means of validating input. Does that make sense?
Comment 6 Robert Munteanu CLA 2010-12-10 11:00:35 EST
To me it makes sense. Duration is mapped read-only right now anyway, since it's a repository-calculated field.
Comment 7 Thomas Ehrnhoefer CLA 2010-12-10 11:08:29 EST
Yes, for Mantis and that specific attribute that is true. However other attributes (e.g. effort) can have various formats (e.g. in Jira there is a 2w 1d 3h format, others have just hours), which should be editable.
Comment 8 Robert Munteanu CLA 2010-12-11 16:49:17 EST
Thomas, I agree that the way repositories display and allow input for effort / duration / work done is different. What I want to underline though is that there is common ground: the attribute specifies a duration. This should be internally stored in the same way for all repositories. 

Allowing the attribute to be editable means that different connectors might choose to have their own way of displaying this time input, but I guess that's another discussion.
Comment 9 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn