Skip to content

Sync requirements creation with work items

What does this MR do and why?

Whenever a requirement gets created an issue of type requirement is also created. The same happens the other way around. We are keeping both records in sync in order to move requirements to work items.

This is the final MR of stage IIb described on #323779 (closed)

How to set up and validate locally

  1. Create a requirement on UI
  2. Go to rails console and check if Issue.last.title == Requirement.last.title and Issue.last.requirement?

ps: There is still no way to test the other way around on UI because we cannot create issues of type requirement yet.
You can test on rails console using:

Issues::CreateService.new(current_user: User.first, project: User.projects.first, { title: 'an issue', issue_type: 'requirement' }).execute

Then check the same assertion of step 2.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Felipe Cardozo

Merge request reports