Community
Participate
Working Groups
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.
Great idea. Would you be interested in contributing that?
Well, why not. Any pointers would be appreciated, as I have no idea where to start.
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.
Created attachment 174434 [details] mylyn/context/zip
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?
To me it makes sense. Duration is mapped read-only right now anyway, since it's a repository-calculated field.
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.
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.
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