Skip to content

Case type Rules tab: Add condition is disabled without saying why #6421

Open

Description

@SudoThijn

Description

In Add rule on a case type's Rules tab, "Add condition" is disabled on a case type that has no fields, statuses or document types. The button looks greyed out, and the dialog only says "No conditions: the rule always applies.". Nothing says why a condition can't be added or what to add first, so it reads as a button that doesn't work.

Steps to reproduce

  1. Open Advanced → Case types and create or open a draft case type with no fields, statuses or document types, then its Rules tab.
  2. Click Add rule and try Add condition.

Expected behaviour

The dialog says why no condition can be added and where to fix that, for example: "This case type has no fields, statuses or document types yet, so a rule can't test anything. Add them on the Fields and Statuses tabs."

Actual behaviour

Add rule: under If, "No conditions: the rule always applies." and a greyed out Add condition

Cause

The fields a condition can name come from ruleFields (src/services/caseTypeRules.js:46): the case type's fields, plus "status" when it has statuses, plus one entry per document type. When that list is empty, CnConditionListEditor disables the button (@conduction/nextcloud-vue, CnConditionListEditor.vue:28) and shows its emptyText prop, or the default "No conditions: the rule always applies." (line 12). CaseTypeRuleDialog.vue (lines 42-46) passes no emptyText, so the default shows. Passing an emptyText that explains the empty list when fields is empty fixes it in Dossiq. The library could also say something by default when the button is disabled, so other apps don't hit the same gap.

Related: on a case type that inherits from another, the list is meant to include the inherited fields, read from /api/case-types/{id}/blueprint (fetchBlueprintCatalogue, caseTypeRules.js:150). When that call fails, RulesTab.vue (loadCaseType) falls back to the case type's own fields and statuses only. The call currently fails, and #5340 fixes it.

Acceptance criteria

  • When the case type has nothing a condition can name, the dialog says so and says where to add fields, statuses or document types
  • Add condition is either hidden in that case or its disabled state is explained
  • On a case type with fields, nothing changes

Activity

  1. github-actions commented on Nov 14, 2026

    @github-actions
    Contributor

    Thank you for opening this issue! It has been assigned to @rubenvdlinde for review.

    What happens next:

    1. A maintainer will review this issue and determine the appropriate action
    2. If accepted, it may be converted into an OpenSpec change for structured development
    3. You will be notified of any status changes

    Triage labels:

    • triage:accept-feature — accepted as a new feature
    • triage:accept-bugfix — accepted as a bug fix
    • triage:needs-info — more information needed
    • triage:wontfix — will not be addressed
    • triage:duplicate — duplicate of another issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriageAwaiting triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions