import { RedmineTypes } from '../models/redmine-types';

export function GetParentsHint(issues: RedmineTypes.Issue[]): string {
  const parentsHint = issues
    .map((issue) => {
      if (issue.id < 0) {
        return '...';
      }
      return `${issue.tracker.name} #${issue.id} (${issue.subject})`;
    })
    .join(' > ');
  return parentsHint;
}
