Skip to main content
Last updated: 11 Jul 2024

Change an organisation's slug

Note

For Worldwide Organisations, only steps 1 and 4 below need to be performed.

The organisation slug is used as a foreign key for organisations across multiple apps.

1. Change the organisation’s slug in Whitehall

Run the appropriate rake task:

Note: it’s important that single-quotes are used in the tasks otherwise they will fail.

2. Update the organisation slug in Manuals Publisher

Run the following rake task in Manuals Publisher:

rake reslug_organisation[old_slug,new_slug]

3. Sync the organisations with Signon

Signon assigns users to organisations. This is used by apps such as Whitehall for authorisation.

To sync all organisations from Whitehall to Signon, run the Signon rake task rake organisations:fetch. Users may have to log out and in again to pick up permissions for the renamed organisation.

4. Update any best bet searches in Search Admin

Check the best_bets.yml file in search-api-v2 for any references to the old organisation name, and update them if so.

Note: as of July 2024, the YAML file above is the only way to configure ‘best bets’, but the search team are working on building a feature in search-admin, which may replace the above instructions.