Skip to content

🔧 Allow links in needservice directive#1632

Merged
ubmarco merged 2 commits into
useblocks:masterfrom
filipepcampos:master
May 22, 2026
Merged

🔧 Allow links in needservice directive#1632
ubmarco merged 2 commits into
useblocks:masterfrom
filipepcampos:master

Conversation

@filipepcampos
Copy link
Copy Markdown
Contributor

Hi! I noticed that it was not possible to create needs with links (custom or otherwise) through a custom service.

Looking a bit deeper into the existing open-needs service, it seems like it should support links
e.g. from the tests:

    {
        "key": "NEP_003",
        "type": "Requirement",
        "title": "Rocket painting",
        "description": "Red and blue. No other colors please.",
        "format": "txt",
        "project_id": 1,
        "options": {
            "status": "open",
            "priority": "low",
            "costs": 20000,
            "approved": 1,
        },
        "references": {"links": ["NEP_001", "NEP_002"]},
    },

Just added the link keys to the allowed options, similarly to what's done in the need.py directive

Copy link
Copy Markdown
Member

@ubmarco ubmarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks functionally ok. Thanks for the fix.
Just one concern.

Comment thread tests/test_open_needs_service.py
@ubmarco ubmarco merged commit a50a2f9 into useblocks:master May 22, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: needs_links names are not considered in needservice.py

2 participants