Display global issue link only if necessary

should fix #689
Please adjust the order of terminal states with the one of states (`done` first).