Skip to content

Bug: needs_links names are not considered in needservice.py #1694

@silber-lu

Description

@silber-lu

Problem description

We recently migrated from sphinx_needs version 3.0.0 to version 7.0.0. It seems like the restructuring to needs_fields and needs_links causes need services to omit links from the returned data, since the link names are no longer present in the defined_options. I don't think this is the intended behavior.

Solution proposal

Adding the link names back to the defined_option solves this issue. I feel like this was an oversight during the restructuring.

            defined_options = {
                "debug",
                "type",
                "id",
                "collapse",
                "hide",
                "jinja_content",
                "status",
                "tags",
                "style",
                "layout",
                "template",
                "pre_template",
                "post_template",
                "constraints",
                "content",
                *needs_schema.iter_extra_field_names(),
                *needs_schema.iter_link_field_names(), # Add this line to needservice.py
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions