Follow-up from "Delegate Requirement model attributes"
The following discussion from !74296 (merged) should be addressed:
-
@egrieff started a discussion: I believe this is a bug uncovered by having the associated issue in the requirement factory that will satisfy the condition in line 13.
In cases where the are no attributes to change
#save_requirement_issue
returnsnil
and we can't callvalid?
on it.I've opted for a simple solution here and will open a new issue to follow up on it.
The method SyncWithRequirementIssue#sync_issue_for
is used in CreateRequirementService
and UpdateRequirementService
and only the first one expect an issue as response.
Maybe it's worth checking if there are attributes to change before synching.