Skip to content
Back to top
View this page
Edit this page

# needtable

Added in version 0.2.0.

needtable generates a table, based on the result of given filters.

Example 1

    .. needtable:: Example table
       :tags: main_example
       :style: table

No needs passed the filters

We use the argument of a `needtable` as caption for the table.

## Options

Note

needtable supports the full filtering possibilities of Sphinx-Needs. Please see Filtering needs for more information.

### columns

A comma/semicolon separated string used to define the position of specific columns. For instance:

    .. needtable::
       :columns: id;title;tags

This will show the columns id, title and tags in the order given.

Example 2

    .. needtable::
       :columns: id;title;tags

ID | Title | Tags
--- | --- | ---
ACT_ANALYSIS | Analysis issue |
ACT_BARKS | Barks for support |
ACT_BUG | Find & Report bug | gantt_example
ACT_BUG_ANALYSE | Analyse bug | gantt_example
ACT_CREATE_EX | Create example | gantt_ex_duration
ACT_CREATE_EX_C | Create example | gantt_ex_completion
ACT_CREATE_EX_EW | Create example | gantt_ex_ends_with
ACT_CREATE_EX_SA | Create example | gantt_ex_starts_after
ACT_CREATE_EX_SW | Create example | gantt_ex_starts_with
ACT_DEPLOY | Deploy release | gantt_example
ACT_INFORM | Informs reporter |
ACT_ISSUE | Creates issue |
ACT_READ_EX | Read example | gantt_ex_duration
ACT_READ_EX_C | Read example | gantt_ex_completion
ACT_READ_EX_EW | Read example | gantt_ex_ends_with
ACT_READ_EX_SA | Read example | gantt_ex_starts_after
ACT_READ_EX_SW | Read example | gantt_ex_starts_with
ACT_RELEASE_PLAN | Add solution to release plan | gantt_example
ACT_REVIEW | Reviews solution |
ACT_SOLUTION | Provides solution |
ACT_TEST | Test release | gantt_example
ACT_TICKET | Create solution ticket | gantt_example
ACT_TICKET_WORK | Work on solution ticket | gantt_example
ACT_UNDERSTAND_EX_SW | Understand example | gantt_ex_starts_with
basic_example | Basic need example |
clv_A | Input A |
clv_B | Input B |
clv_C | Input C |
COMP_001 | Component X |
COMP_002 | Component Y |
COMP_A_B | Variant A or B |
COMP_NEEDUML2 | NeedUml example need 2 | needuml
COMP_T_001 | COMP_T_001 |
COMP_T_002 | COMP_T_002 |
COMP_T_003 | COMP_T_003 |
COMP_X | Component X |
COMP_Z | Z |
CON_REQ_1 | Requirement 1 |
CON_REQ_2 | Requirement 2 |
CON_SPEC_1 | Test spec |
CON_SPEC_2 | Test spec 2 |
copy_1 | copy-example | tag_1; tag_2; tag_3
copy_2 | copy-example implementation |
copy_3 | test of specification and requirement | tag_1; tag_2; tag_3
copy_4 | test of current_need value |
DELID123 | Second Requirement Need |
DELID124 | Nested Need without delete option | nested-del-need
df_1 | my test requirement | test; open
EX_CLEAN | CLEAN layout | a; b; c; example
EX_CLEAN_L | CLEAN_L layout | a; b; c; example
EX_CLEAN_LP | CLEAN_LP layout | a; b; c; example
EX_CLEAN_R | CLEAN_R layout | a; b; c; example
EX_CLEAN_RP | CLEAN_RP layout | a; b; c; example
EX_COMPLETE | COMPLETE layout | a; b; c; example
EX_DEBUG | DEBUG layout | a; b; c; example
EX_FOCUS | FOCUS layout | a; b; c; example
EX_FOCUS_F | FOCUS_F layout | a; b; c; example
EX_FOCUS_L | FOCUS_L layout | a; b; c; example
EX_FOCUS_R | FOCUS_R layout | a; b; c; example
EX_REQ_1 | A normal requirement |
EX_REQ_2 | A more complex and highlighted requirement | awesome; nice; great; example
EX_REQ_3 | A focused requirement | example
EX_REQ_4 | A custom requirement with picture | example
EX_REQ_5 | A requirement with a permalink | example
EX_ROW_1 | Implemented spec | ex_row_color
EX_ROW_2 | Not implemented spec | ex_row_color
EX_ROW_3 | Spec under progress | ex_row_color
EX_STYLE_BLUE | Blue background | example
EX_STYLE_BLUE_BAR | Blue bar | example
EX_STYLE_BLUE_BORDER | Blue border | example
EX_STYLE_CLEAN | Clean style | example
EX_STYLE_DISCREET | Discreet background | example
EX_STYLE_DISCREET_BORDER | Discreet border | example
EX_STYLE_DISCREET_COMBI | Discreet view | example
EX_STYLE_GREEN | Green background | example
EX_STYLE_GREEN_BAR | Green bar | example
EX_STYLE_GREEN_BORDER | Green border | example
EX_STYLE_ORANGE_BAR | Orange bar | example
EX_STYLE_RED | Red background | example
EX_STYLE_RED_BAR | Red bar | example
EX_STYLE_RED_BORDER | Red border | example
EX_STYLE_YELLOW | Yellow background | example
EX_STYLE_YELLOW_BAR | Yellow bar | example
EX_STYLE_YELLOW_BORDER | Yellow border | example
EX_STYLE_YELLOW_RED | Yellow background + Red border | example
EXAMPLE_STRING_LINKS | Use needs_string_links |
EXT-FEATURE-A | Feature A |
EXT-FEATURE-B | Feature B | B
EXT-REQ-1 | Requirement 1 | A; fast
EXT-REQ-2 | Requirement 2 | A; big
extend_test_001 | needextend Example 1 | tag_1; tag_2; new_tag
extend_test_002 | needextend Example 2 | extend_example; other
extend_test_003 | needextend Example 3 |
extend_test_004 | needextend Example 4 |
extend_test_005 | needextend Example 5 |
extend_test_006 | needextend Example 6 |
EXTRA_REQ_001 | My requirement |
EXTRA_TEST_001 | Test of requirements |
EXTRACT_FEATURE_1 | A feature |
F_74E48 | (FEATURE |
F_F25D3 | Level 1 |
FAIL_01 |  |
FEATURE_NEEDUML1 | NeedUml example need | needuml
ID123 | User needs to login | user; login
IMAGE_EXAMPLE | My test spec | example
IMPL_01 | Implementation for specification |
impl_my_car_1 | Build awesome car |
INT_001 | Test needuml save |
INT_A | Interface A |
JINJA1D8913 | Need with jinja_content enabled |
JINJAID123 | First Req Need |
JINJAID125 | Nested Spec Need | user; login
JINJAID126 | First Spec Need |
LAYOUT_1 | My layout requirement 1 | layout_example
LAYOUT_2 | My layout requirement 2 | layout_example
LAYOUT_3 | My layout requirement 3 | layout_example
LIST2NEED-001 | Feature 1 |
LIST2NEED-002 | Feature 2 |
LIST2NEED-REQ-1 | Requirement which shall get also need-parts |
→ LIST2NEED-REQ-1.1 | → The first need-part |
→ LIST2NEED-REQ-1.ANOTHER | → ANOTHER need-part |
MS_BUG_SOLVED | Bug solved | gantt_example
MS_TICKET_CLOSED | Solution ticket closed | gantt_example
my_car_1 | Car must be awesome | car
→ my_car_1.1 | → A top speed of 300 km/h | car
→ my_car_1.2 | → An acceleration of 200 m/s² or much much more | car
→ my_car_1.awesome_3 | → a turbo button | car
NEED-002 | Another Need example on level 1 with a given ID |
NEED-A | Login user |
NEED-B | Provide login screen |
NEED-C | Create password hash |
NEED-D | Recalculate hash and compare |
OWN_ID_123 | Specification of a requirement |
R_17EB4 | Set admin e-mail to admin@mycompany.com |
R_22EB2 | Requirement B | B; filter_example
R_262A1 | Link example Source |
R_2A9D0 | Requirement A | A; filter_example
R_316DE | Collapse is set to False | collapse; example
R_3C95C | Result 4 |
R_3FFAA |  |
R_446C7 | Group big short |
R_50FCC | Level 1 need and more |
R_53FBF | Level 1 need with rst |
R_565A6 | This is a requirement with a very long title that will need to be |
R_6F47F |  | critical
R_96D5E | Result 2 |
R_A2D07 | Collapse is set to True | collapse; example
R_A6A4E | test requirement |
R_BAFCF | The first sentence will be the title |
R_D0791 | Result 3 |
R_D8F29 | This will be my title |
R_EA5C4 | Level 2 |
R_F199E | Level 1 need with newlines |
R_F1B63 | Need example on level 1 |
R_F4722 | My first requirement | requirement; test; awesome
R_F7DEB | Result 1 |
req_arch_001 | Requirement arch |
req_arch_002 | Req Arch second |
req_arch_003 | Req Arch third |
req_arch_004 | Req Arch four |
req_flow_001 | A requirement | flow_example
REQ_LINK_1 | Link example Target |
roles_req_1 | Sliced Bread |
roles_req_2 | Butter on Bread |
S_01A67 | Specification B | B; filter_example
S_38199 | And a complex sub-need on level 2 with an image-directive |
S_3A83D | result 1: Positive check |
S_4137F | result 2: Negative check |
S_69FFD | Another Sub-Need on level 2 |
S_6A582 | And a spec need |
S_78442 | result 3: Positive check thanks of used filter |
S_951C8 | result 5: Two checks and a joint status |
S_9ED38 | result 4: Positive check thanks of one_hit option |
S_B4B62 | Sub-Need on level 2 with status option set |
S_CE0AA | Level 3 |
S_D70B0 | Specification A | A; filter_example
SECURITY_REQ |  |
SP_INT | Interfaces |
spec_flow_001 | A specification | flow_example
→ spec_flow_001.subspec_1 | → A testable part of the specification | flow_example
→ spec_flow_001.subspec_2 | → Another testable part of the specification | flow_example
spec_flow_002 | Another specification | flow_example
spec_flow_003 | A child specification | flow_example
STYLE_001 | My styled requirement | style_example
STYLE_002 | Another styled requirement | style_example
STYLE_003 | Green is my color | style_example
STYLE_004 | Yellow and blue border |
STYLE_005 | My automatically styled requirement | style_example
STYLE_006 | My automatically styled requirement | style_example
sum_input_1 | Do this |
sum_input_2 | Do that |
sum_input_3 | Do too much |
SYS_ROCKET | System RocketScience |
T_001 | Unit test 1 | tutorial; tutorial_tests
T_002 | Unit test 2 | tutorial; tutorial_tests
T_003 | Unit test 3 | tutorial; tutorial_tests
T_004 | Unit test 4 | tutorial; tutorial_tests
T_0F2B7 | Level 4 |
T_5CCAA | Test 1 | filter_example
T_C3893 | Test for XY | test; user_interface; python27
T_CAR | Our new car | tutorial
T_CONNECT | Connectivity and Entertainment | tutorial
T_DIST | Implement distant detection | tutorial
T_EA5AF | Sub-Need on level 3 |
T_RADAR | Implement RADAR system | tutorial
T_SAFE | Safety Features | tutorial
table_001 | Test need with need parts |
→ table_001.1 | → Part 1 of requirement |
→ table_001.2 | → Part 2 of requirement |
→ table_001.3 | → Part 3 of requirement |
table_002 | Specifies part 1 |
table_003 | Specifies part 2 |
TEMPL_POST_SPEC | My specification | example; template
TEMPL_PRE_SPEC | My specification | example; template
TEMPL_SPEC | My specification | example; template
test_001 | test a requirement |
test_arch_001 | Test Arch |
test_flow_001 | A test case | flow_example
test_req | test me |
USER_A | Mr. A |
USER_B | Ms. B |
USER_C | Expert C |
USER_D | Office Dog |
VA_004 | Variant options | variants; support
xyz_123 | My requirement with custom options |

You can set all options of a need (incl. needs_extra_options) as a column. This also includes internal options like `docname` (Use :layout: debug on a need for a complete list)

If you set :columns:, the current table will not use the value of config parameter needs_table_columns.

Tables with a lot of columns will get a horizontal scrollbar in HTML output.

DataTable style

Example 3

    .. needtable::
       :tags: test
       :columns: id;title;tags;status;docname;lineno,is_external,is_need;is_part;content

ID | Title | Tags | Status | Docname | Lineno | Is External | Is Need | Is Part | Content
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
df_1 | my test requirement | test; open | open | dynamic_functions | 20 | False | True | False | This need has id :ndf:`copy("id")` and status :ndf:`copy("status")`.
R_F4722 | My first requirement | requirement; test; awesome | open | filter | 425 | False | True | False | This is my **first** requirement!! .. note:: You can use any rst code inside it :)
T_C3893 | Test for XY | test; user_interface; python27 | implemented | filter | 445 | False | True | False | This test checks :need:`IMPL_01` for :need:`OWN_ID_123` inside a Python 2.7 environment.

Normal style

Example 4

    .. needtable::
       :tags: test
       :style: table
       :columns: id;title;tags;status;docname;lineno,is_external,is_need;is_part;content

ID | Title | Tags | Status | Docname | Lineno | Is External | Is Need | Is Part | Content
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
df_1 | my test requirement | test; open | open | dynamic_functions | 20 | False | True | False | This need has id :ndf:`copy("id")` and status :ndf:`copy("status")`.
R_F4722 | My first requirement | requirement; test; awesome | open | filter | 425 | False | True | False | This is my **first** requirement!! .. note:: You can use any rst code inside it :)
T_C3893 | Test for XY | test; user_interface; python27 | implemented | filter | 445 | False | True | False | This test checks :need:`IMPL_01` for :need:`OWN_ID_123` inside a Python 2.7 environment.

### colwidths

Added in version 0.7.4.

A comma separated list of lengths or percentages used to define the width of each column.

It has the same meaning as the `width options` of listtable directive.

Example 5

    .. needtable::
       :tags: test
       :columns: id,title,status
       :colwidths: 50,40,10
       :style: table

ID | Title | Status
--- | --- | ---
df_1 | my test requirement | open
R_F4722 | My first requirement | open
T_C3893 | Test for XY | implemented

#### Custom column titles

You can customize each column title by following this syntax for its definition: `OPTION as "My custom title"`. The characters `,` or `;` are not allowed.

Example 6

    .. needtable::
       :tags: test
       :columns: id;title as "Headline"; tags as "Labels"
       :style: table

ID | Headline | Labels
--- | --- | ---
df_1 | my test requirement | test; open
R_F4722 | My first requirement | requirement; test; awesome
T_C3893 | Test for XY | test; user_interface; python27

### show_filters

If set, we add the used filter above the table:

Example 7

    .. needtable::
       :tags: test
       :columns: id;title;tags
       :show_filters:
       :style: table

ID | Title | Tags
--- | --- | ---
df_1 | my test requirement | test; open
R_F4722 | My first requirement | requirement; test; awesome
T_C3893 | Test for XY | test; user_interface; python27

Used filter: tags(test)

### style

Allows you to set a specific style for the current table.

Supported values are:

> - table

> - datatables

Overrides config parameter needs_table_style if set.

Show example

Example 8

    .. needtable::
       :style: table

    .. needtable::
       :style: datatables

ID | Title | Status | Outgoing
--- | --- | --- | ---
ACT_ANALYSIS | Analysis issue |  | USER_B
ACT_BARKS | Barks for support |  |
ACT_BUG | Find & Report bug |  |
ACT_BUG_ANALYSE | Analyse bug |  | ACT_BUG
ACT_CREATE_EX | Create example |  |
ACT_CREATE_EX_C | Create example |  |
ACT_CREATE_EX_EW | Create example |  |
ACT_CREATE_EX_SA | Create example |  |
ACT_CREATE_EX_SW | Create example |  |
ACT_DEPLOY | Deploy release |  | ACT_RELEASE_PLAN
ACT_INFORM | Informs reporter |  | USER_A
ACT_ISSUE | Creates issue |  | USER_B
ACT_READ_EX | Read example |  | ACT_CREATE_EX
ACT_READ_EX_C | Read example |  | ACT_CREATE_EX_C
ACT_READ_EX_EW | Read example |  |
ACT_READ_EX_SA | Read example |  |
ACT_READ_EX_SW | Read example |  | ACT_CREATE_EX_SW
ACT_RELEASE_PLAN | Add solution to release plan |  | MS_TICKET_CLOSED
ACT_REVIEW | Reviews solution |  | USER_C
ACT_SOLUTION | Provides solution |  | USER_C
ACT_TEST | Test release |  | ACT_DEPLOY
ACT_TICKET | Create solution ticket |  | ACT_BUG_ANALYSE
ACT_TICKET_WORK | Work on solution ticket |  | ACT_TICKET
ACT_UNDERSTAND_EX_SW | Understand example |  |
basic_example | Basic need example |  |
clv_A | Input A | in progress |
clv_B | Input B | in progress |
clv_C | Input C | closed |
COMP_001 | Component X |  |
COMP_002 | Component Y |  |
COMP_A_B | Variant A or B |  |
COMP_NEEDUML2 | NeedUml example need 2 | draft |
COMP_T_001 | COMP_T_001 |  |
COMP_T_002 | COMP_T_002 |  |
COMP_T_003 | COMP_T_003 |  |
COMP_X | Component X |  |
COMP_Z | Z |  |
CON_REQ_1 | Requirement 1 |  |
CON_REQ_2 | Requirement 2 |  |
CON_SPEC_1 | Test spec |  | CON_REQ_1; CON_REQ_2
CON_SPEC_2 | Test spec 2 |  | CON_REQ_1; CON_REQ_2
copy_1 | copy-example | open |
copy_2 | copy-example implementation | open | copy_1
copy_3 | test of specification and requirement |  | copy_2; copy_1
copy_4 | test of current_need value |  |
DELID123 | Second Requirement Need |  |
DELID124 | Nested Need without delete option |  |
df_1 | my test requirement | open |
EX_CLEAN | CLEAN layout | open | EX_COMPLETE; EX_FOCUS
EX_CLEAN_L | CLEAN_L layout | open |
EX_CLEAN_LP | CLEAN_LP layout | open |
EX_CLEAN_R | CLEAN_R layout | open |
EX_CLEAN_RP | CLEAN_RP layout | open |
EX_COMPLETE | COMPLETE layout | open | EX_CLEAN; EX_FOCUS
EX_DEBUG | DEBUG layout | open |
EX_FOCUS | FOCUS layout | open | EX_COMPLETE; EX_CLEAN
EX_FOCUS_F | FOCUS_F layout | open |
EX_FOCUS_L | FOCUS_L layout | open |
EX_FOCUS_R | FOCUS_R layout | open |
EX_REQ_1 | A normal requirement | open |
EX_REQ_2 | A more complex and highlighted requirement | open | EX_REQ_1
EX_REQ_3 | A focused requirement | open |
EX_REQ_4 | A custom requirement with picture | open |
EX_REQ_5 | A requirement with a permalink | open |
EX_ROW_1 | Implemented spec | implemented |
EX_ROW_2 | Not implemented spec | open |
EX_ROW_3 | Spec under progress | in progress |
EX_STYLE_BLUE | Blue background |  |
EX_STYLE_BLUE_BAR | Blue bar |  |
EX_STYLE_BLUE_BORDER | Blue border |  |
EX_STYLE_CLEAN | Clean style |  |
EX_STYLE_DISCREET | Discreet background |  |
EX_STYLE_DISCREET_BORDER | Discreet border |  |
EX_STYLE_DISCREET_COMBI | Discreet view |  |
EX_STYLE_GREEN | Green background |  |
EX_STYLE_GREEN_BAR | Green bar |  |
EX_STYLE_GREEN_BORDER | Green border |  |
EX_STYLE_ORANGE_BAR | Orange bar |  |
EX_STYLE_RED | Red background |  |
EX_STYLE_RED_BAR | Red bar |  |
EX_STYLE_RED_BORDER | Red border |  |
EX_STYLE_YELLOW | Yellow background |  |
EX_STYLE_YELLOW_BAR | Yellow bar |  |
EX_STYLE_YELLOW_BORDER | Yellow border |  |
EX_STYLE_YELLOW_RED | Yellow background + Red border |  |
EXAMPLE_STRING_LINKS | Use needs_string_links |  |
EXT-FEATURE-A | Feature A |  |
EXT-FEATURE-B | Feature B | done | EXT-FEATURE-A
EXT-REQ-1 | Requirement 1 |  |
EXT-REQ-2 | Requirement 2 |  |
extend_test_001 | needextend Example 1 | closed |
extend_test_002 | needextend Example 2 | New status |
extend_test_003 | needextend Example 3 | open | extend_test_004
extend_test_004 | needextend Example 4 | open |
extend_test_005 | needextend Example 5 | open |
extend_test_006 | needextend Example 6 | open | extend_test_003; extend_test_004
EXTRA_REQ_001 | My requirement |  |
EXTRA_TEST_001 | Test of requirements |  |
EXTRACT_FEATURE_1 | A feature |  |
F_74E48 | (FEATURE |  |
F_F25D3 | Level 1 |  |
FAIL_01 |  |  |
FEATURE_NEEDUML1 | NeedUml example need | draft |
ID123 | User needs to login | open |
IMAGE_EXAMPLE | My test spec | open |
IMPL_01 | Implementation for specification |  | OWN_ID_123
impl_my_car_1 | Build awesome car |  | my_car_1.1; my_car_1.2
INT_001 | Test needuml save |  |
INT_A | Interface A |  |
JINJA1D8913 | Need with jinja_content enabled |  |
JINJAID123 | First Req Need |  |
JINJAID125 | Nested Spec Need | open | JINJAID126
JINJAID126 | First Spec Need | open |
LAYOUT_1 | My layout requirement 1 |  |
LAYOUT_2 | My layout requirement 2 |  |
LAYOUT_3 | My layout requirement 3 |  |
LIST2NEED-001 | Feature 1 |  |
LIST2NEED-002 | Feature 2 |  |
LIST2NEED-REQ-1 | Requirement which shall get also need-parts |  |
→ LIST2NEED-REQ-1.1 | → The first need-part |  |
→ LIST2NEED-REQ-1.ANOTHER | → ANOTHER need-part |  |
MS_BUG_SOLVED | Bug solved |  | ACT_TEST
MS_TICKET_CLOSED | Solution ticket closed |  | ACT_TICKET_WORK
my_car_1 | Car must be awesome | open |
→ my_car_1.1 | → A top speed of 300 km/h | open |
→ my_car_1.2 | → An acceleration of 200 m/s² or much much more | open |
→ my_car_1.awesome_3 | → a turbo button | open |
NEED-002 | Another Need example on level 1 with a given ID |  |
NEED-A | Login user |  |
NEED-B | Provide login screen |  |
NEED-C | Create password hash |  | NEED-D
NEED-D | Recalculate hash and compare |  |
OWN_ID_123 | Specification of a requirement |  | R_F4722
R_17EB4 | Set admin e-mail to admin@mycompany.com |  |
R_22EB2 | Requirement B | closed |
R_262A1 | Link example Source |  | REQ_LINK_1
R_2A9D0 | Requirement A | open |
R_316DE | Collapse is set to False |  |
R_3C95C | Result 4 |  | sum_input_1; sum_input_3
R_3FFAA |  |  |
R_446C7 | Group big short |  |
R_50FCC | Level 1 need and more |  |
R_53FBF | Level 1 need with rst |  |
R_565A6 | This is a requirement with a very long title that will need to be |  |
R_6F47F |  |  | SECURITY_REQ
R_96D5E | Result 2 |  |
R_A2D07 | Collapse is set to True |  |
R_A6A4E | test requirement |  |
R_BAFCF | The first sentence will be the title |  |
R_D0791 | Result 3 |  | sum_input_1; sum_input_3
R_D8F29 | This will be my title |  |
R_EA5C4 | Level 2 |  |
R_F199E | Level 1 need with newlines |  |
R_F1B63 | Need example on level 1 |  |
R_F4722 | My first requirement | open |
R_F7DEB | Result 1 |  |
req_arch_001 | Requirement arch |  |
req_arch_002 | Req Arch second |  |
req_arch_003 | Req Arch third |  |
req_arch_004 | Req Arch four | draft | req_arch_001
req_flow_001 | A requirement |  |
REQ_LINK_1 | Link example Target |  |
roles_req_1 | Sliced Bread | open |
roles_req_2 | Butter on Bread |  | roles_req_1
S_01A67 | Specification B | open |
S_38199 | And a complex sub-need on level 2 with an image-directive |  |
S_3A83D | result 1: Positive check | progress | clv_A; clv_B
S_4137F | result 2: Negative check |  | clv_A; clv_B; clv_C
S_69FFD | Another Sub-Need on level 2 |  |
S_6A582 | And a spec need |  |
S_78442 | result 3: Positive check thanks of used filter | progress | clv_A; clv_B; clv_C
S_951C8 | result 5: Two checks and a joint status | progress closed | clv_A; clv_B; clv_C
S_9ED38 | result 4: Positive check thanks of one_hit option | progress | clv_A; clv_B; clv_C
S_B4B62 | Sub-Need on level 2 with status option set | open |
S_CE0AA | Level 3 |  |
S_D70B0 | Specification A | closed |
SECURITY_REQ |  |  |
SP_INT | Interfaces | open |
spec_flow_001 | A specification |  | req_flow_001
→ spec_flow_001.subspec_1 | → A testable part of the specification |  |
→ spec_flow_001.subspec_2 | → Another testable part of the specification |  |
spec_flow_002 | Another specification |  | req_flow_001; spec_flow_001
spec_flow_003 | A child specification |  | req_flow_001
STYLE_001 | My styled requirement |  |
STYLE_002 | Another styled requirement |  |
STYLE_003 | Green is my color |  |
STYLE_004 | Yellow and blue border |  |
STYLE_005 | My automatically styled requirement | implemented |
STYLE_006 | My automatically styled requirement | open |
sum_input_1 | Do this |  |
sum_input_2 | Do that |  |
sum_input_3 | Do too much |  |
SYS_ROCKET | System RocketScience |  |
T_001 | Unit test 1 | closed |
T_002 | Unit test 2 | in progress |
T_003 | Unit test 3 | open |
T_004 | Unit test 4 | open |
T_0F2B7 | Level 4 |  |
T_5CCAA | Test 1 |  |
T_C3893 | Test for XY | implemented | OWN_ID_123; IMPL_01
T_CAR | Our new car |  |
T_CONNECT | Connectivity and Entertainment |  |
T_DIST | Implement distant detection |  |
T_EA5AF | Sub-Need on level 3 |  |
T_RADAR | Implement RADAR system |  |
T_SAFE | Safety Features |  |
table_001 | Test need with need parts |  |
→ table_001.1 | → Part 1 of requirement |  |
→ table_001.2 | → Part 2 of requirement |  |
→ table_001.3 | → Part 3 of requirement |  |
table_002 | Specifies part 1 |  | table_001.1
table_003 | Specifies part 2 |  | table_001.2
TEMPL_POST_SPEC | My specification |  | STYLE_001; STYLE_002
TEMPL_PRE_SPEC | My specification |  |
TEMPL_SPEC | My specification | open | STYLE_001; STYLE_002
test_001 | test a requirement |  | test_req
test_arch_001 | Test Arch |  | req_arch_002; req_arch_003
test_flow_001 | A test case |  | spec_flow_002; spec_flow_001.subspec_1; spec_flow_001.subspec_2
test_req | test me |  |
USER_A | Mr. A |  | ACT_ISSUE
USER_B | Ms. B |  | ACT_ANALYSIS; ACT_SOLUTION
USER_C | Expert C |  | ACT_REVIEW; ACT_INFORM
USER_D | Office Dog |  |
VA_004 | Variant options | disabled |
xyz_123 | My requirement with custom options | open |

ID | Title | Status | Outgoing
--- | --- | --- | ---
ACT_ANALYSIS | Analysis issue |  | USER_B
ACT_BARKS | Barks for support |  |
ACT_BUG | Find & Report bug |  |
ACT_BUG_ANALYSE | Analyse bug |  | ACT_BUG
ACT_CREATE_EX | Create example |  |
ACT_CREATE_EX_C | Create example |  |
ACT_CREATE_EX_EW | Create example |  |
ACT_CREATE_EX_SA | Create example |  |
ACT_CREATE_EX_SW | Create example |  |
ACT_DEPLOY | Deploy release |  | ACT_RELEASE_PLAN
ACT_INFORM | Informs reporter |  | USER_A
ACT_ISSUE | Creates issue |  | USER_B
ACT_READ_EX | Read example |  | ACT_CREATE_EX
ACT_READ_EX_C | Read example |  | ACT_CREATE_EX_C
ACT_READ_EX_EW | Read example |  |
ACT_READ_EX_SA | Read example |  |
ACT_READ_EX_SW | Read example |  | ACT_CREATE_EX_SW
ACT_RELEASE_PLAN | Add solution to release plan |  | MS_TICKET_CLOSED
ACT_REVIEW | Reviews solution |  | USER_C
ACT_SOLUTION | Provides solution |  | USER_C
ACT_TEST | Test release |  | ACT_DEPLOY
ACT_TICKET | Create solution ticket |  | ACT_BUG_ANALYSE
ACT_TICKET_WORK | Work on solution ticket |  | ACT_TICKET
ACT_UNDERSTAND_EX_SW | Understand example |  |
basic_example | Basic need example |  |
clv_A | Input A | in progress |
clv_B | Input B | in progress |
clv_C | Input C | closed |
COMP_001 | Component X |  |
COMP_002 | Component Y |  |
COMP_A_B | Variant A or B |  |
COMP_NEEDUML2 | NeedUml example need 2 | draft |
COMP_T_001 | COMP_T_001 |  |
COMP_T_002 | COMP_T_002 |  |
COMP_T_003 | COMP_T_003 |  |
COMP_X | Component X |  |
COMP_Z | Z |  |
CON_REQ_1 | Requirement 1 |  |
CON_REQ_2 | Requirement 2 |  |
CON_SPEC_1 | Test spec |  | CON_REQ_1; CON_REQ_2
CON_SPEC_2 | Test spec 2 |  | CON_REQ_1; CON_REQ_2
copy_1 | copy-example | open |
copy_2 | copy-example implementation | open | copy_1
copy_3 | test of specification and requirement |  | copy_2; copy_1
copy_4 | test of current_need value |  |
DELID123 | Second Requirement Need |  |
DELID124 | Nested Need without delete option |  |
df_1 | my test requirement | open |
EX_CLEAN | CLEAN layout | open | EX_COMPLETE; EX_FOCUS
EX_CLEAN_L | CLEAN_L layout | open |
EX_CLEAN_LP | CLEAN_LP layout | open |
EX_CLEAN_R | CLEAN_R layout | open |
EX_CLEAN_RP | CLEAN_RP layout | open |
EX_COMPLETE | COMPLETE layout | open | EX_CLEAN; EX_FOCUS
EX_DEBUG | DEBUG layout | open |
EX_FOCUS | FOCUS layout | open | EX_COMPLETE; EX_CLEAN
EX_FOCUS_F | FOCUS_F layout | open |
EX_FOCUS_L | FOCUS_L layout | open |
EX_FOCUS_R | FOCUS_R layout | open |
EX_REQ_1 | A normal requirement | open |
EX_REQ_2 | A more complex and highlighted requirement | open | EX_REQ_1
EX_REQ_3 | A focused requirement | open |
EX_REQ_4 | A custom requirement with picture | open |
EX_REQ_5 | A requirement with a permalink | open |
EX_ROW_1 | Implemented spec | implemented |
EX_ROW_2 | Not implemented spec | open |
EX_ROW_3 | Spec under progress | in progress |
EX_STYLE_BLUE | Blue background |  |
EX_STYLE_BLUE_BAR | Blue bar |  |
EX_STYLE_BLUE_BORDER | Blue border |  |
EX_STYLE_CLEAN | Clean style |  |
EX_STYLE_DISCREET | Discreet background |  |
EX_STYLE_DISCREET_BORDER | Discreet border |  |
EX_STYLE_DISCREET_COMBI | Discreet view |  |
EX_STYLE_GREEN | Green background |  |
EX_STYLE_GREEN_BAR | Green bar |  |
EX_STYLE_GREEN_BORDER | Green border |  |
EX_STYLE_ORANGE_BAR | Orange bar |  |
EX_STYLE_RED | Red background |  |
EX_STYLE_RED_BAR | Red bar |  |
EX_STYLE_RED_BORDER | Red border |  |
EX_STYLE_YELLOW | Yellow background |  |
EX_STYLE_YELLOW_BAR | Yellow bar |  |
EX_STYLE_YELLOW_BORDER | Yellow border |  |
EX_STYLE_YELLOW_RED | Yellow background + Red border |  |
EXAMPLE_STRING_LINKS | Use needs_string_links |  |
EXT-FEATURE-A | Feature A |  |
EXT-FEATURE-B | Feature B | done | EXT-FEATURE-A
EXT-REQ-1 | Requirement 1 |  |
EXT-REQ-2 | Requirement 2 |  |
extend_test_001 | needextend Example 1 | closed |
extend_test_002 | needextend Example 2 | New status |
extend_test_003 | needextend Example 3 | open | extend_test_004
extend_test_004 | needextend Example 4 | open |
extend_test_005 | needextend Example 5 | open |
extend_test_006 | needextend Example 6 | open | extend_test_003; extend_test_004
EXTRA_REQ_001 | My requirement |  |
EXTRA_TEST_001 | Test of requirements |  |
EXTRACT_FEATURE_1 | A feature |  |
F_74E48 | (FEATURE |  |
F_F25D3 | Level 1 |  |
FAIL_01 |  |  |
FEATURE_NEEDUML1 | NeedUml example need | draft |
ID123 | User needs to login | open |
IMAGE_EXAMPLE | My test spec | open |
IMPL_01 | Implementation for specification |  | OWN_ID_123
impl_my_car_1 | Build awesome car |  | my_car_1.1; my_car_1.2
INT_001 | Test needuml save |  |
INT_A | Interface A |  |
JINJA1D8913 | Need with jinja_content enabled |  |
JINJAID123 | First Req Need |  |
JINJAID125 | Nested Spec Need | open | JINJAID126
JINJAID126 | First Spec Need | open |
LAYOUT_1 | My layout requirement 1 |  |
LAYOUT_2 | My layout requirement 2 |  |
LAYOUT_3 | My layout requirement 3 |  |
LIST2NEED-001 | Feature 1 |  |
LIST2NEED-002 | Feature 2 |  |
LIST2NEED-REQ-1 | Requirement which shall get also need-parts |  |
→ LIST2NEED-REQ-1.1 | → The first need-part |  |
→ LIST2NEED-REQ-1.ANOTHER | → ANOTHER need-part |  |
MS_BUG_SOLVED | Bug solved |  | ACT_TEST
MS_TICKET_CLOSED | Solution ticket closed |  | ACT_TICKET_WORK
my_car_1 | Car must be awesome | open |
→ my_car_1.1 | → A top speed of 300 km/h | open |
→ my_car_1.2 | → An acceleration of 200 m/s² or much much more | open |
→ my_car_1.awesome_3 | → a turbo button | open |
NEED-002 | Another Need example on level 1 with a given ID |  |
NEED-A | Login user |  |
NEED-B | Provide login screen |  |
NEED-C | Create password hash |  | NEED-D
NEED-D | Recalculate hash and compare |  |
OWN_ID_123 | Specification of a requirement |  | R_F4722
R_17EB4 | Set admin e-mail to admin@mycompany.com |  |
R_22EB2 | Requirement B | closed |
R_262A1 | Link example Source |  | REQ_LINK_1
R_2A9D0 | Requirement A | open |
R_316DE | Collapse is set to False |  |
R_3C95C | Result 4 |  | sum_input_1; sum_input_3
R_3FFAA |  |  |
R_446C7 | Group big short |  |
R_50FCC | Level 1 need and more |  |
R_53FBF | Level 1 need with rst |  |
R_565A6 | This is a requirement with a very long title that will need to be |  |
R_6F47F |  |  | SECURITY_REQ
R_96D5E | Result 2 |  |
R_A2D07 | Collapse is set to True |  |
R_A6A4E | test requirement |  |
R_BAFCF | The first sentence will be the title |  |
R_D0791 | Result 3 |  | sum_input_1; sum_input_3
R_D8F29 | This will be my title |  |
R_EA5C4 | Level 2 |  |
R_F199E | Level 1 need with newlines |  |
R_F1B63 | Need example on level 1 |  |
R_F4722 | My first requirement | open |
R_F7DEB | Result 1 |  |
req_arch_001 | Requirement arch |  |
req_arch_002 | Req Arch second |  |
req_arch_003 | Req Arch third |  |
req_arch_004 | Req Arch four | draft | req_arch_001
req_flow_001 | A requirement |  |
REQ_LINK_1 | Link example Target |  |
roles_req_1 | Sliced Bread | open |
roles_req_2 | Butter on Bread |  | roles_req_1
S_01A67 | Specification B | open |
S_38199 | And a complex sub-need on level 2 with an image-directive |  |
S_3A83D | result 1: Positive check | progress | clv_A; clv_B
S_4137F | result 2: Negative check |  | clv_A; clv_B; clv_C
S_69FFD | Another Sub-Need on level 2 |  |
S_6A582 | And a spec need |  |
S_78442 | result 3: Positive check thanks of used filter | progress | clv_A; clv_B; clv_C
S_951C8 | result 5: Two checks and a joint status | progress closed | clv_A; clv_B; clv_C
S_9ED38 | result 4: Positive check thanks of one_hit option | progress | clv_A; clv_B; clv_C
S_B4B62 | Sub-Need on level 2 with status option set | open |
S_CE0AA | Level 3 |  |
S_D70B0 | Specification A | closed |
SECURITY_REQ |  |  |
SP_INT | Interfaces | open |
spec_flow_001 | A specification |  | req_flow_001
→ spec_flow_001.subspec_1 | → A testable part of the specification |  |
→ spec_flow_001.subspec_2 | → Another testable part of the specification |  |
spec_flow_002 | Another specification |  | req_flow_001; spec_flow_001
spec_flow_003 | A child specification |  | req_flow_001
STYLE_001 | My styled requirement |  |
STYLE_002 | Another styled requirement |  |
STYLE_003 | Green is my color |  |
STYLE_004 | Yellow and blue border |  |
STYLE_005 | My automatically styled requirement | implemented |
STYLE_006 | My automatically styled requirement | open |
sum_input_1 | Do this |  |
sum_input_2 | Do that |  |
sum_input_3 | Do too much |  |
SYS_ROCKET | System RocketScience |  |
T_001 | Unit test 1 | closed |
T_002 | Unit test 2 | in progress |
T_003 | Unit test 3 | open |
T_004 | Unit test 4 | open |
T_0F2B7 | Level 4 |  |
T_5CCAA | Test 1 |  |
T_C3893 | Test for XY | implemented | OWN_ID_123; IMPL_01
T_CAR | Our new car |  |
T_CONNECT | Connectivity and Entertainment |  |
T_DIST | Implement distant detection |  |
T_EA5AF | Sub-Need on level 3 |  |
T_RADAR | Implement RADAR system |  |
T_SAFE | Safety Features |  |
table_001 | Test need with need parts |  |
→ table_001.1 | → Part 1 of requirement |  |
→ table_001.2 | → Part 2 of requirement |  |
→ table_001.3 | → Part 3 of requirement |  |
table_002 | Specifies part 1 |  | table_001.1
table_003 | Specifies part 2 |  | table_001.2
TEMPL_POST_SPEC | My specification |  | STYLE_001; STYLE_002
TEMPL_PRE_SPEC | My specification |  |
TEMPL_SPEC | My specification | open | STYLE_001; STYLE_002
test_001 | test a requirement |  | test_req
test_arch_001 | Test Arch |  | req_arch_002; req_arch_003
test_flow_001 | A test case |  | spec_flow_002; spec_flow_001.subspec_1; spec_flow_001.subspec_2
test_req | test me |  |
USER_A | Mr. A |  | ACT_ISSUE
USER_B | Ms. B |  | ACT_ANALYSIS; ACT_SOLUTION
USER_C | Expert C |  | ACT_REVIEW; ACT_INFORM
USER_D | Office Dog |  |
VA_004 | Variant options | disabled |
xyz_123 | My requirement with custom options | open |

### show_parts

Added in version 0.3.6.

Adds an extra table row for each need_part / np found inside a filtered need.

It adds the part rows directly under the related need’s row, and their id and title get a prefix.

To change the prefix please read needs_part_prefix.

Example 9

    .. needtable::
       :tags: test_table
       :filter: is_need
       :show_parts:
       :columns: id;title;outgoing;incoming
       :style: table

No needs passed the filters

Show above example’s configuration

Example 10

    .. req:: Test need with need parts
       :id: table_001

       :np:`(1) Part 1 of requirement`.

       :np:`(2) Part 2 of requirement`.

       :np:`(3) Part 3 of requirement`.

    .. spec:: Specifies part 1
       :id: table_002
       :links: table_001.1

    .. spec:: Specifies part 2
       :id: table_003
       :links: table_001.2

Requirement: Test need with need parts table_001
links incoming: table_002, table_003
Part 1 of requirement 1. Part 2 of requirement 2. Part 3 of requirement 3.

Specification: Specifies part 1 table_002
links outgoing: table_001.1

Specification: Specifies part 2 table_003
links outgoing: table_001.2

### style_row

Added in version 0.4.1.

You can use the `style_row` option to set a specific class-attribute for the table-row representation and use CSS to select the class-attribute

Also, you can set specific layout for the row.

Example 11

    .. needtable::
       :tags: ex_row_color
       :style_row: needs_blue_border

ID | Title | Status | Outgoing
--- | --- | --- | ---
EX_ROW_1 | Implemented spec | implemented |
EX_ROW_2 | Not implemented spec | open |
EX_ROW_3 | Spec under progress | in progress |

#### Row style based on specific need value

You can use Dynamic functions to derive the value for `style_row` based on a specific value of the documented need in the row.

Example 12

    .. needtable::
       :tags: ex_row_color
       :columns: id, title, status
       :style_row: needs_[[copy("status")]]

ID | Title | Status
--- | --- | ---
EX_ROW_1 | Implemented spec | implemented
EX_ROW_2 | Not implemented spec | open
EX_ROW_3 | Spec under progress | in progress

In this example we set `style_row` to `needs_[[copy("status")]]`, so the status of each need will be part of the row style.

Note

If `style_row` contains whitespaces, they get automatically replaced by `_` to get a valid css class name.

So a copied status value like `in progress` will become `in_progress`.

Show used configuration

needtable

    .. needtable::
       :tags: ex_row_color
       :columns: id, title, status
       :style_row: needs_[[copy("status")]]

needs as input

Requirement: Implemented spec EX_ROW_1
status: implemented tags: ex_row_color

Requirement: Not implemented spec EX_ROW_2
status: open tags: ex_row_color

Requirement: Spec under progress EX_ROW_3
status: in progress tags: ex_row_color

inside a provided css file

    tr.needs_implemented {
     background-color: palegreen !important;
    }

    tr.needs_open {
        background-color: palevioletred !important;
    }

    tr.needs_in_progress {
        background-color: palegoldenrod !important;
    }

    /* This sets values for the status column */
    tr.needs_in_progress td.needs_status p {
        background-color: #1b6082;
        padding: 3px 5px;
        text-align: center;
        border-radius: 10px;
        border: 1px solid #212174;
        color: #ffffff;
    }

### sort

Added in version 0.4.3.

Option to sort the filtered-results based on a key.

The sort-value must be compatible with the options supported by the Filter string, and the addressed need-value must have the type `string`, `float` or `int`.

By default, we use `id_complete` if we don’t set a sort option.

Example 13

    .. needtable::
       :tags: ex_row_color
       :style: table

ID | Title | Status | Outgoing
--- | --- | --- | ---
EX_ROW_1 | Implemented spec | implemented |
EX_ROW_2 | Not implemented spec | open |
EX_ROW_3 | Spec under progress | in progress |

In this case, we set the sort option to `status`. So EX_ROW_3 is above of EX_ROW_2.

Example 14

    .. needtable::
       :tags: ex_row_color
       :style: table
       :sort: status

ID | Title | Status | Outgoing
--- | --- | --- | ---
EX_ROW_1 | Implemented spec | implemented |
EX_ROW_3 | Spec under progress | in progress |
EX_ROW_2 | Not implemented spec | open |

Show used configuration

    .. needtable::
       :tags: ex_row_color
       :style: table

    .. needtable::
       :tags: ex_row_color
       :style: table
       :sort: status

Note

Sorting only works if you use the standard sphinx-table for output: `:style: table`. By default, tables generated with DatabTables uses Javascript to sort results.

### class

Added in version 0.7.4.

You can set additional class-names for a `needtable` using the `class` option. Mostly used for HTML output. It supports comma separated values and will add classes to the already set classes by Sphinx-Needs.

custom.css

     table.class_red_border {
         border: 3px solid red;
     }

Example 15

    .. needtable::
       :tags: test
       :columns: id,title,status
       :style: table
       :class: class_red_border

ID | Title | Status
--- | --- | ---
df_1 | my test requirement | open
R_F4722 | My first requirement | open
T_C3893 | Test for XY | implemented

### common filters

- status

- tags

- types

- filter