request #13671 Enable use of tuleap tracker fields in Mylyn commit template variables
    Vincent Hémery (vhemery)
    2019-07-25 12:10
    2019-07-25 09:42
    Enable use of tuleap tracker fields in Mylyn commit template variables
    In the commit template from Mylyn (Preferences > Mylyn > Team), the number of accessible variables is very limited.
    It could be usefull to access any field value in a tracker with a dedicated variable, taking the field name as an argument.
    E.g. using "${tuleap.field("reference")}" to access the value of the field named "reference" in the tracker.

    This is technically made possible by bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=415013 which allows arguments in template variables, though it is not explicit to the end user when using the autocompletion right now.
    Hence, the documentation of such a "tuleap.field" template variable should be explicit to indicate the end user how to add the field name as an attribute.

    The name "tuleap.field" is naturally not definitive and I am opened to better suggestions.
    The variable could also take additional arguments for formatting (for example the date format) or for simple value-label mapping when working on a enumerated field.

    I am currently working on an implementation using the "org.eclipse.mylyn.team.ui.commitTemplates" extension point and the tuleap connector. If that's OK with the team, I could contribute that in a separate plugin (due to the additional dependencies to org.eclipse.mulyn.team.ui and dependencies to other eclipse or tueleap tasks plugins).
    References list is empty


    • User avatar
      The Tuleap Mylyn plugin names follows the same convention as the Eclipse Mylyn plugin names. So I think it's best to keep it that way.
      For the moment, all there is in the Tuleap Mylyn is about "tasks". There is nothing about the "team" part. So that really makes sense to make a different plugin here, otherwise, we would have to rename the plugin where we add it, and possibly break everything.

      The common practice in Eclipse community is one plugin = one concern. And the template variable really is another layer.

      On the other hand, I think it's not worth adding a new feature. So I would update one of the existing features to add the new plugin to it and its dependencies. So I agree with you, but only at feature level (which is what the end user sees at installation).
    • User avatar

      That sounds find to me.

      For the plugin thing, to be honest I don't know. What's the practice in Eclipse community for this kind of things ?

      I tend to think that if the new dep is not that big, it's not worth a dedicated plugin that people will likely to miss. What do you think ?