•  
      request #6246 Task linking does not work if there is space in the Tuleap project name
    Infos
    #6246
    Patricia Carrasco (pcar)
    2014-06-18 17:53
    2014-02-18 23:17
    6326
    Details
    Task linking does not work if there is space in the Tuleap project name
    If the Tuleap project name has a space or another character such as an dash, the task hyper link does not work. See attached image
    Mylyn
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Emilio Palmiero (empa)
    Stage
    Empty
    Acknowledged
    Empty
    Attachments
    Task hyper link in code
    References

    Follow-ups

    User avatar
    I just checked how other connectors do:
    Bugzilla, Trac, Fogbugz Just use the numeric ID of the ticket.
    JIRA uses a technical ID of project followed by a dash "-", then the numeric ID.

    Unfortunately, we don't have any short technical id for the project, except its numeric ID which is not very user-friendly.

    But we could prefix with the technical ID of the tracker (for instance, "user_stories#1234"), which would be consistent with the web interface.

    • Reported in version cleared values: 6.10
    User avatar
    Just to add context to this request, here are some important informations.

    Another issue due to the same cause occurs in "artifact link" fields when using auto-completion. See also #5435.

    The root cause is the "key" we use for Tuleap tasks in mylyn (this "key" is automatically displayed by Mylyn before the task label in the task view, it is for the moment the concatenation of

    The project label, ":", the tracker label, "-", the task numeric ID.

    Since both the project label and the tracker label can contain spaces, and mylyn does not handle spaces in other places where it uses this key, I recommend to change the structure of this key, for something much simpler : "#" followed by the numeric ID (for instance, #1234)

    This would lose less room in the task list and facilitate hyperlinking in text files and auto-completion in artifact link fields.
    The drawback is that users wouldn't know immediately to which project and tracker a task belongs.
    User avatar
    Thanks for the explanation. I will discuss with Emilio and we'll get back to you shortly.
    User avatar
    Just one last remark: If spaces are allowed, there is a risk that the eclipse code formatter will break such a valid URL by introducing carriage return characters to automatically format the javadoc.
    User avatar
    Ok, I understand the problem.
    We detect the links in the javadoc text by looking for a "naive" regular expression.
    The problem is, we cannot build a more intelligent generic regex that would take spaces and special characters into account.
    What we can do is build a regex based on the actual labels of projects and trackers available in the configuration, so that "User Playground:Tasks-20454" would be detected correctly.
    I have a working prototype of that.
    Nevertheless, this option has a tiny drawback: if the label of a project or one of its trackers changes, all the links used in the javadocs will not be recognized anymore.

    I don't see any simple solution that would not have this drawback. All I can think of is to force the use of a "special" character, for example "#", to identify the beginning of such a URL.
    For example, we could demand the use of a # before the task ID. But the task ID itself cannot be changed lightly, since it is displayed everywhere in the Mylyn UI.
    (The task ID is also what you get when you right-click on a task in the task list and select "Copy Details > ID")

    Do you agree with the proposed solution with the drawback I mentioned?
    User avatar
    In my sample code I reference a task as described in the You tube video: http://www.youtube.com/watch?v=wMKS0Oew2J4. As mentioned above it does not work if there is a space or dash in the Tuleap project name. Please see new attached image.

    User avatar
    I cannot reproduce the problem.
    I have a task in a project with spaces in the name, and when I open (Right-click > Open in browser), everything is fine.
    So I suspect I have misunderstood the problem.
    What do you mean exactly by "Task hyperlink"?