Handle timelog categories when using /spend quick action on group noteables
The following discussion from !140990 (merged) should be addressed:
-
@acroitor started a discussion: (+3 comments) @leetickett-gitlab FYI: for work items at group level there will be no way to associate a category as
timelogs
table does not have anamespace_id
and also it allows theproject_id
to beNULL
I am going to change this line to:
return unless project.present? TimeTracking::TimelogCategory.find_by_name(project.root_namespace, category).first&.id
so that it does not fail and also it does not try to set a random category, but it would be nice to follow-up and improve this for group level work items
/cc @zillemarco