Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needs_id_regex should not apply on needs_external_needs #1099

Closed
David-Le-Nir opened this issue Feb 5, 2024 · 1 comment · Fixed by #1108
Closed

needs_id_regex should not apply on needs_external_needs #1099

David-Le-Nir opened this issue Feb 5, 2024 · 1 comment · Fixed by #1108

Comments

@David-Le-Nir
Copy link
Contributor

David-Le-Nir commented Feb 5, 2024

When using needs_id_regex and when referencing external documents via needs_external_needs the regex is checked against all "remote" needs.

Would it be possible to only check the regex for the "local" document ?

For my users, each document should have its own regex for their own needs. Then when they refer to other documents, the regex check fails.

I agree with my users that the expected behaviour of the needs_id_regex should to only apply locally because else every documents have to use the same regex.

I guess including is_external value in the regex check would not be too hard. The questions are:

  • how to make this behaviour optional, like a new option need_id_regex_local_only
  • and what would be its default value

If you agree on this, I can make the PR if you want.

@danwos
Copy link
Member

danwos commented Feb 15, 2024

Ohh, that's an interesting bug, and thanks for reporting it.

I agree that the external_needs should not be checked by the regex.
So I don't even need an option to configure this, I would just deactivate it completely for external_needs.

I see no use case, why the needs of project A should be checked by rules in project B.

Will be happy to merge an upcoming PR.

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 a pull request may close this issue.

2 participants