Skip to content

Check if epic's parent is exportable when exporting a group

Related to #384024 (closed)

What does this MR do and why?

When introducing cross-group child epics there might be cases where the user cannot read an epic's parent, even if they have sufficient permission to export the group.

This MR implements conditional export for epic's parent association.

Validate locally

  1. In rails console enable cross-group child epics
    Feature.enable(:child_epics_from_different_hierarchies)
  2. Create a group (test-group) with 3 epics: Child 1, Child 2, Parent Epic
  3. Create a private group (private-group) with 1 epic: External Parent
  4. Visit Parent Epic and add existing epic Child 1 as a child
  5. Visit External Parent and add existing epic Child 2 as a child
  6. Add a new user user2 as owner of test-group
  7. Log in as user2 and export the group by visiting Advanced in the group's settings: gdk.test:3000/groups/test-group/-/edit
  8. Find the email Test Group | Group was exported by visiting http://gdk.test:3000/rails/letter_opener and download the attachment.
  9. The JSON file containing the epics data should include the parent field for Child 1 but not for Child 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 Eugenia Grieff

Merge request reports

Loading