Fix bug that happened when there was no category associated to an issue

fixes #30642