-
Notifications
You must be signed in to change notification settings - Fork 194
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
Remove non-editionable worldwide organisation code #9216
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brucebolt
force-pushed
the
remove-non-ed-ww-org
branch
25 times, most recently
from
July 8, 2024 15:54
f37f232
to
c9fc3cd
Compare
brucebolt
changed the title
Remove non-editionable worldwide organisations
Remove non-editionable worldwide organisation code
Jul 8, 2024
brucebolt
force-pushed
the
remove-non-ed-ww-org
branch
3 times, most recently
from
July 9, 2024 08:23
0e6c5aa
to
42accd7
Compare
`WorldwideOrganisation` has been removed, so we no longer need to display their history or audit trail. In `EditionableWorldwideOrganisation`, we use the standard `Edition` workflow to show history.
Worldwide Organisations now use the `WorldwideOrganisationPage` model, so we can uncouple them from `CorporateInformationPage`. This leaves `CorporateInformationPage` being solely for use with `Organisation`.
Now worldwide organisations are no longer associated with `CorporateInformationPage`, the complexity around `owning_organisation` has been removed. The method is now only an alias for `organisation`, so we can remove the method completely and replace all uses with `organisation`.
Corporate Information Pages can now only be associated with organisations, so we no longer need to separate them out into something reusable.
We have removed `WorldwideOrganisation`, so can delete the code to deal with their translations.
We no longer need to associate editions with worldwide organisations, as they don't exist. Other mechanisms exist for associating editionable worldwide organisations with editions.
We no longer need to associate roles with worldwide organisations, as they don't exist. Other mechanisms exist for associating editionable worldwide organisations with roles.
We no longer need to associate world locations with worldwide organisations, as they don't exist. Other mechanisms exist for associating editionable worldwide organisations with world locations.
This was used to link `Organisation` to `WorldwideOrganisation`. Since we have deleted the latter, the link can also be deleted.
This is not being used anymore.
This is no longer being used, so we can delete the model, controller and views, plus the associated tests and helpers. Where the `worldwide_organisation` test factory has been used, this has been replaced with `editionable_worldwide_organisation`, but only where the test remains relevant.
This method is now only being used in one place, so the presence in a helper is no longer required.
In order to see the political checkbox, you need to be logged in as a user. Therefore adding this to the test setup.
These are Worldwide Organisations, not World Organisations, so adjusting the variable name to be consistent throughout the application.
As all code for `WorldwideOrganisation` has been removed, the remaining feature flags can now also be deleted.
The feature flag rules (incorrectly) overrode the usual edition workflow rules. When the feature flag was removed, we started enforcing the correct rules for unpublishing and withdrawing editionable worldwide organisations. Therefore updating the tests to reflect the permissions required.
In #7346, we introduced specific error handling for a known problem with Worldwide Organisations. These have been removed, so the error handling can also be removed.
`sponsored_worldwide_organisations` is only used in tests, so removing the code.
These were used to administer the non-editionable worldwide organisations, but are no longer needed.
The `new_base_path` method is not being used, so can be deleted.
The embassies index page currently includes all worldwide organisations (including drafts), whereas we only want those that have been published to appear on this page.
This is an alias for `organisations` on the `EditionableWorldwideOrganisation` model, so we can simply replace it with `organisations`.
brucebolt
force-pushed
the
remove-non-ed-ww-org
branch
from
July 17, 2024 15:45
3bc473a
to
531ee0b
Compare
JonathanHallam
approved these changes
Jul 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, brilliant removal. If i'm being super picky i think a couple of the later commits could be broken out, namely the typos, permissions fixes and login as user before running tests, but I think that's small enough that I'm not worries.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have replaced the
WorldwideOrganisation
model withEditionableWorldwideOrganisation
and have migrated the data to the new version. Therefore deleting all the code associated with the non-editionable version.Later PRs will remove the database tables/columns associated with these and rename
EditionableWorldwideOrganisation
toWorldwideOrganisation
.Trello card