Skip to content

Import and export Group Wikis

What does this MR do?

In this MR we add the logic to import and export group wikis (and all the group wikis of any descendant group). We're adding a new exporter and restorer in the respective group import and export service.

The changes are behind a feature flag.

Screenshots

Now the repositories are stored in the repositories folder. Each repository has the id of the old group that we later translate.

image

Steps to test it

In local development, create a group and a subgroup and enable the feature flag group_wiki_import_export. Then, in each one of them, click on the group's wiki and create a wiki page (it's located in the group's main page).

Captura_de_pantalla_2021-02-03_a_las_15.21.39

After creating the wiki pages go to the main group Settings > General > Advanced > Export group section and click on the Export group button:

Captura_de_pantalla_2021-02-03_a_las_15.29.00

Once clicked, the page will reload. It will take a couple of seconds (remember to have a fresh Sidekiq, usually when changing between branches it gets stucked) but after (you might need to reload the page again), the button Download Export will appear:

Captura_de_pantalla_2021-02-03_a_las_15.33.44

If you open the downloaded file, you would see a structure similar to the image in the description, with a repositories folder, and one .bundle file per each wiki repo.

Well, now it's time to import it. For that, we can go to the + icon and click on New Group.

Captura_de_pantalla_2021-02-03_a_las_15.37.11

There we can go to the Import group tab, fill the details and upload the downloaded export file.

Captura_de_pantalla_2021-02-03_a_las_15.37.58

Once the import is completed, we should have the same group structure, and each group and subgroup should have a wiki with the pages we created.

Does this MR meet the acceptance criteria?

Conformity

Related to #207886 (closed)

Merge request reports