Order or requirements in Specification Document

I have attached requirements to a use case (Use Case Details --> Requirements --> Add).
Using the arrows, I have also ordered the requirements so that they follow the use case flow and in general they are in the right logical order.
However, when I generate the specification document or even when I do a custom Use Case document (using Details) the requirements are shown in totally random order. They are not even by REQ ID (asc. or desc.), which in a way I could understand and cope with if they were.
How can I make the extract take the requirements in the same order as they appear on screen?

1 Like

First: Welcome to the VP community! Small detail, but hey :wink:

I liked your post because I think this is a really interesting issue, one for which I don’t have the answers just yet. I can reproduce the issue. Reason I post anyway is because I hope my post will provide more context for others (in the mean time I’m also going to do more digging myself).

(note: req001, req003 and req002)

Pardon the silly comments, when I’m trying to help I kinda type on the fly while also trying to keep things somewhat relevant (I dislike random keyboard garbage like “djskdjks” and such).

I looked into the requirements template code and found this:

<!-- Requirements -->
	<HasValueChecker property="requirements">
		<Text style="@heading+">Requirements</Text>
		<ForEach ignoreLastSeparator="false" property="requirements">
			<Inline template="Basic"/>

… making me wonder if we can’t add some kind of forced sequence into that. That’s the part I’m going to look into.

But you’re right: the sequence is definitely somewhat messed up.

1 Like

Hi! Thank you so much for the reply and for looking into it. I have never looked at the code behind the document generation, but I did stumble upon this help page this morning:

According to the explanations in the article, I am after followTree sorting, not sure if it can be used with the use case requirement template.

Thanks again