Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Empty participatory process group is created when importing a PP … #10692

Merged
merged 1 commit into from Apr 11, 2023

Conversation

alecslupu
Copy link
Contributor

@alecslupu alecslupu commented Apr 6, 2023

🎩 What? Why?

When exporting the participatory processes, the ParticipatoryProcessGroup is either set to an existing one if is linked in the exporting platform, or set to empty result, if the ParticipatoryProcess is not tied to any group.
When importing the ParticipatoryProcess, the system is checking if there is a Group defined in the platform, otherwise it will create the group. When the group in the json file is blank, the importer script will try to find the group, and because is empty a new Group will be created each time.

This PR, checks to see if the exported group is defined ( title and description ), and if is not, it will skip the Group generation.

📌 Related Issues

Link your PR to an issue

Testing

Describe the best way to test or validate your PR.

  1. Login to admin panel
  2. Visit the participatory process and export one that is not bound to a group
  3. Take the exported file, and import it in the system
  4. See that a Group has been created
  5. Apply patch
  6. Repeat the import process
  7. See there is no Group created.

♥️ Thank you!

@alecslupu alecslupu added module: participatory processes type: fix PRs that implement a fix for a bug labels Apr 6, 2023
@alecslupu alecslupu added this to Pending review from Product in Maintainers via automation Apr 6, 2023
@alecslupu alecslupu requested a review from a team April 10, 2023 22:04
@alecslupu alecslupu marked this pull request as ready for review April 10, 2023 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: participatory processes type: fix PRs that implement a fix for a bug
Projects
Development

Successfully merging this pull request may close these issues.

Empty participatory process group is created when importing a PP without a group
2 participants