You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Requirement references throws error if requirement_ids are not defined #42
if you are writing your references like in example 2, the the report command will throw an error since it expects a value in the requirement_ids field.
The questions is what is correct? Should you be able to define sources without requirement_ids? In that case, the logic in report.py (line 178) needs to change, otherwise, the schema needs to be updated to not allow sources to be defined without requirements_ids
What we seen is a use of 'sources' where the reference is pointing to a specific section of a external document holding the original text which the requirement is from. In this case we don't reference another requirement but something outside reqstool. In this case the source of the requirement encoded in reqstool.
A valid use of the 'references.sources' field, and according to the schema.
Could reference sources other than other requirements be written in the rationale field instead? I think that the reference part of the requirements.yml originally where only used to reference other requirements.
'references' part of requirements has been rather unclear until latest schema. In rationale we can put whatever info and that's where references to sources of the requirement was before the 'references.sources' field was in the schema.
I think the current 'references' part works fine when you are referring to already created requirements in Reqstool. But currently there is no structured way to reference a external documents outside Reqstool.
I see three use cases for 'references':
Reference a requirement in Reqstool.
This use case we have covered and is implemented
Reference a external document with requirements
In this case we just mapping the requirement into Reqstool. But we still need a way to reference the original requirement and the document .
Reference a external document with not requirements.
When creating a requirement in Reqstool based on a document that has no requirements. We need to be able to reference a document and where in the document.
The description/rational part might be sufficient for the last two use cases. But it would be nice the have something more structured.
Sources will be removed from schema and requirements_ids will be a required field if references are defined. References value will aslo change slightly. See below.
Activity
lfvjimisola commentedon Mar 14, 2024
This is the correct behaviour.
https://github.com/Luftfartsverket/reqstool-client/blob/main/src/reqstool/resources/schemas/v1/requirements.schema.json#L274
lfvbarcus commentedon Mar 15, 2024
Alright. Then we will have to consider this a bug in reqstool-client since it expects the requirments_id field to be present.
lfvjimisola commentedon Mar 15, 2024
Why is it a bug?
That requirements_id needs to be present if references is is the expected behavior to my knowledge and what we decided on before.
How is it suppose to work instead?
lfvbarcus commentedon Mar 15, 2024
I would consider this a bug since if you define:
and would like a report of your requirements the application will crash.
I'm not saying that it should work in any other way, just that it currently doesn't work as it is intended to.
lfvjimisola commentedon Mar 15, 2024
But this is not how one is suppose to specify references. I say again,
sourcesis not an urn_id list - check schema.This is the current valid format:
where sources is an array of strings that just is human readable to hint about the referenced req id(s).
lfvjimisola commentedon Mar 15, 2024
Yes, the require for requirements_id is missing. I thought I wrote that above but it seems as if I never sent it.
Sorry about the confusion.
lfvbarcus commentedon Mar 15, 2024
That's fine. Then a change to the schema is all that needs to be done.
rlinhem commentedon Mar 15, 2024
What we seen is a use of 'sources' where the reference is pointing to a specific section of a external document holding the original text which the requirement is from. In this case we don't reference another requirement but something outside reqstool. In this case the source of the requirement encoded in reqstool.
A valid use of the 'references.sources' field, and according to the schema.
lfvbarcus commentedon Mar 18, 2024
Could reference sources other than other requirements be written in the
rationalefield instead? I think that the reference part of the requirements.yml originally where only used to reference other requirements.rlinhem commentedon Mar 18, 2024
'references' part of requirements has been rather unclear until latest schema. In rationale we can put whatever info and that's where references to sources of the requirement was before the 'references.sources' field was in the schema.
lfvJonas commentedon Mar 18, 2024
I think the current 'references' part works fine when you are referring to already created requirements in Reqstool. But currently there is no structured way to reference a external documents outside Reqstool.
I see three use cases for 'references':
Reference a requirement in Reqstool.
This use case we have covered and is implemented
Reference a external document with requirements
In this case we just mapping the requirement into Reqstool. But we still need a way to reference the original requirement and the document .
Reference a external document with not requirements.
When creating a requirement in Reqstool based on a document that has no requirements. We need to be able to reference a document and where in the document.
The description/rational part might be sufficient for the last two use cases. But it would be nice the have something more structured.
lfvbarcus commentedon Mar 19, 2024
Sources will be removed from schema and requirements_ids will be a required field if references are defined. References value will aslo change slightly. See below.
lfvbarcus commentedon Mar 19, 2024
So, this issue should be addressed in the following manner:
We should update the schema for the references field of the requirements.yml