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

Limit relationship to only certain valid item ids #247

Open
Letme opened this issue Nov 4, 2021 · 1 comment
Open

Limit relationship to only certain valid item ids #247

Letme opened this issue Nov 4, 2021 · 1 comment
Assignees

Comments

@Letme
Copy link
Member

Letme commented Nov 4, 2021

The request is to output a warning or even an error when item uses a relationship to another item which is not accepted.

As example, we have relationship parent,child. Then we have item1 ITEM_PARENT-ITEM1 which has child relationship to item2 ITEM_CHILD-ITEM2 (valid) and then we have item3 which is ITEM_CHILD-ITEM3 which as child relationship to ITEM_PARENT-ITEM1. In this case item3 relationship child should trigger a warning/error as only parent relationship should be allowed.

Proposed implementation is to allow only certain regex to be part of the relationship like

relationship: parent,child
relationship_validation: ITEM_PARENT-*,ITEM_CHILD-*

FYI: @dryodon

@JasperCraeghs
Copy link
Member

JasperCraeghs commented Jul 26, 2022

This is an shortened configuration to serve as an example. It should only contain forward relationships:

{
    'SYSRQT': {
        'depends_on': 'SWRQT',
        'validates': 'SWQTEST',
    },
    'SWRQT': {
        'depends_on': 'SWRQT|SWARCH',
        'validates': 'SWQTEST',
    },
    'SWARCH' {
        'depends_on': 'SWDESIGN',
        'validates': 'SWITEST',
    },
    ...
}

If a relationship that is not documented in this configuration dictionary is detected in the documentation, a warning shall be produced, i.e., this configuration shall be exhaustive. Or shall it be configurable to be non-exhaustive as well @Letme ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants