sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

FR : list2need : having the ability to set tags that will be attached to all items in the list

Open christopheseyler opened this issue 11 months ago • 2 comments

For example, I need to write down all requirements for a specific component. To easily identify the req associated to the component, I would like to tag them. So, it would be easier to write something like that

.. list2need::
  :types: req
  :tags: MyComponent
     
   * (REQ-01) Description of REQ1
   * (REQ-02) Description of REQ2
   * (REQ-03) Description of REQ3

Where all the 3 requirements would have the MyComponent tag

christopheseyler avatar Mar 16 '24 14:03 christopheseyler

The idea is good.

As a not-so-nice workaround, you could use needextend to set the tag later.

Untested example:


My Needs
--------

.. list2need::
  :types: req
  :tags: MyComponent
     
   * (REQ-01) Description of REQ1
   * (REQ-02) Description of REQ2
   * (REQ-03) Description of REQ3

.. needextend:: section_name == "My needs"
   :tags: MyComponent

danwos avatar Mar 19 '24 07:03 danwos

I've tried something like that but for now, ... the needextend does not support filter string, only single id (the bug is already reported #745)

christopheseyler avatar Mar 19 '24 08:03 christopheseyler

closed in #296

chrisjsewell avatar Oct 08 '24 15:10 chrisjsewell