Customizing an issue's window title

We have a problem in that a lot of our issue summaries start the same (e.g. "Problem with ..."). This makes it really difficult to differentiate the issues that are open in tabs in the browser since all we can see are 5 tabs that say "Problem with". This isn't a big deal for most of our team, but we do have one person in particular who spends a lot of time with tabs open and runs into this constantly.

I'm wondering if there is a way to change the window titles to start with the issue ID instead of the summary text so our issues can be differentiated when opened in tabs.

I looked all through the settings and couldn't find any related setting, so I'm expecting not, but thought I would do my duty to the team and ask to be sure. :)

EDIT: Forgot to mention this is on an InCloud YouTrack instance running version 2017.3.

5 comments
Comment actions Permalink
Official comment

Hello! Actually, this is as deisgned at the moment. We had many customers complaining that they could see only IDs in the tabs and no summary at all, so we changed the behaviour to start the tab title from the summary instead of ID.

In your case, it probably would be better to change the way you name your tasks - for example, repeat the issue ID in the beginning of the summary.

Please let us know if you have any further questions. Thanks!

Comment actions Permalink

We had many customers complaining that they could see only IDs in the tabs and no summary at all, so we changed the behaviour to start the tab title from the summary instead of ID.

Wow, that's ironic. Leave it to our team to work differently. That's good to know.

In your case, it probably would be better to change the way you name your tasks - for example, repeat the issue ID in the beginning of the summary.

That's a brilliant idea (I'm disappointed I didn't think of it first). I can even create a custom workflow to ensure that it is done consistently. Thanks for the idea. :)

0
Comment actions Permalink

I unfortunately don't have a proper solution to that. As the issue persists in YT 2022.1, I reported it in JT-71754.

0
Comment actions Permalink

Since it seems the change was by-design, I expect it is unlikely to change. However, we've been using a workflow script and it has worked very well (this was cobbled together from multiple scripts, so I'm sorry if it doesn't quite compile):

var entities = require('@jetbrains/youtrack-scripting-api/entities');

var issueIdRE = /^ *([A-Z]+\-\d+): */;

exports.rule = entities.Issue.onChange({
title: 'Add the issue ID to an issue summary',
  guard: function(ctx) {
    var issue = ctx.issue;
   return issue.becomesReported ||
    (issue.isReported && (issue.isChanged('summary') || issue.isChanged('project')));
  },
  action: function(ctx) {
    var issue = ctx.issue;
    var matches = issue.summary.match(issueIdRE);
    var addIssueId = !matches;
    if (matches && matches[1] !== issue.id) {
        issue.summary = issue.summary.replace(issueIdRE, '');
        addIssueId = true;
    }
    
    if (addIssueId)
        issue.summary = issue.id + ': ' + issue.summary;
  },
  requirements: {
    // None
  }
});
0
Comment actions Permalink

Thank you Fool Running

I agree that changing the default should not be expected, but I expect a preference will be added to choose the order.

0

Please sign in to leave a comment.