diff --git a/docs/changelog.rst b/docs/changelog.rst index b428bee57..3520c3927 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -11,6 +11,12 @@ Unreleased :Released: Unreleased +Improvements +............ + +- 👌 Allow link fields in :ref:`needservice` directive options, so needs + created via a custom service can declare links to other needs (:pr:`1632`) + Bug fixes ......... diff --git a/sphinx_needs/directives/needservice.py b/sphinx_needs/directives/needservice.py index 720fd8948..de1c46e0a 100644 --- a/sphinx_needs/directives/needservice.py +++ b/sphinx_needs/directives/needservice.py @@ -93,6 +93,7 @@ def run(self) -> Sequence[nodes.Node]: "constraints", "content", *needs_schema.iter_extra_field_names(), + *needs_schema.iter_link_field_names(), } for datum in service_data: options = {} diff --git a/tests/test_open_needs_service.py b/tests/test_open_needs_service.py index 211eff3ea..0998e4d49 100644 --- a/tests/test_open_needs_service.py +++ b/tests/test_open_needs_service.py @@ -104,6 +104,9 @@ def test_ons_service(test_app): assert "Test rocket power" in html assert "ONS_TEST_NEP_004" in html assert "NEP_003" in html + assert "links outgoing" in html + assert "ONS_TEST_NEP_001" in html + assert "ONS_TEST_NEP_002" in html assert "open" in html assert "Debug data" in html