Skip to content

Maintain redirects to canonical identifiers for objects #60

@cokernel

Description

@cokernel

Each object in ExploreUK should have a single identifier. However, sometimes we accidentally create more than one identifier for the same object. In these cases, ExploreUK should have a mechanism to mark the duplication and designate a specific identifier as the canonical identifier. A content manager or admin should have a way to use this mechanism, and also should be able to select which copy of the object should be served to users.

I think the "As a <role>" wording is not valid Gherkin syntax, but I've included it to separate content manager scenarios from visitor scenarios.

Feature: Objects have canonical identifiers
    As a content manager

    Scenario: Most canonical identifiers are set automatically
        Given the Rupert file does not exist in ExploreUK
        When I add the Rupert file to ExploreUK with identifier ABC
        Then the Rupert file should have canonical identifier ABC

    Scenario: Select a canonical identifier when duplicates exist
        Given the Rupert file has canonical identifier ABC
            And a copy of the Rupert file has been added to ExploreUK with identifier XYZ
        When I instruct ExploreUK that XYZ is a copy of ABC
        Then XYZ should become a non-canonical identifier of the Rupert file
            And ABC should remain the canonical identifier of the Rupert file

    Scenario: Select a canonical object when duplicates exist
        Given the Rupert file has canonical identifier ABC
            And a copy of the Rupert file has been added to ExploreUK with identifier XYZ
        When I instruct ExploreUK that the canonical content for the Rupert file is currently at XYZ
        Then the canonical copy of the Rupert file should use the content currently at XYZ


    As a visitor

    Scenario: User visits item through canonical identifier
        Given the Rupert file has canonical identifier ABC
        When I visit the ExploreUK item at identifier ABC
        Then I should access the Rupert file

    Scenario: User visits item through non-canonical identifier
        Given the Rupert file has canonical identifier ABC
            And the Rupert file has non-canonical identifier XYZ
        When I visit the ExploreUK item at identifier XYZ
        Then I should be redirected to the ExploreUK item at identifier ABC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions