-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix generated search URLs for project statistics #1954
Fix generated search URLs for project statistics #1954
Conversation
Search URLs generated for the project statistic page were caught by Jinja2 autoescaping, which makes them invalid. A good place to mark them as safe is the view object: It's the immediate layer below Jinja templates and specifically made to provide strings included by a Jinja2 template. Relates to strictdoc-project#1920.
aac4222
to
daa243f
Compare
Unrelated to this MR: The new e2e test show two results that I wouldn't have expected
This always remains 0, no matter where I place unconnected requirements. What is it meant to count?
Should IMO be 5. It seems that |
|
strictdoc/export/html/generators/view_objects/project_statistics_view_object.py
Show resolved
Hide resolved
A root-level requirement becomes 'connected' if there is another requirement that has a RELATION to it.
This logic was written with the assumption that the Backlog requirements do not contribute to these project statistics. If a requirement has no status, it can then be found with another metric and its status should be set to a meaningful vallue. I think it is pretty consistent or? |
Added! |
Yes but the query says "not connected to". Nothing in the test input.sdoc is connected (there are no relations), so this should be 5, not 0. The question comes down to: How would
Not sure. All other queries in project statistics are written so that backlog requirements do contribute. That's a bit inconsistent. Anyway, I made a wrong assumption in my previous comment:
It actually evaluates to True and that's good. |
Now I understand what was causing the confusion. The document needs to be marked as ROOT: True, see this for example:
I found no better way of assigning a root because StrictDoc cannot know what is a root of a graph.
Yes, I can see a bit of consistency. The idea was to exclude Backlog reqs clearly from the Which / are there any other metrics you would want to see with
Good. |
Now I understand too :) Thanks for explaining. Just learnt one can mark even multiple documents with
Up to now we don't use the |
Search URLs generated for the project statistic page were caught by Jinja2 autoescaping, which makes them invalid.
A good place to mark them as safe is the view object: It's the immediate layer below Jinja templates and specifically made to provide strings included by a Jinja2 template.
Relates to #1920.