Skip to content

[FEATURE] Per-Project Export Template Assignment and Default Selection #85

@therealbrad

Description

@therealbrad

Feature Summary

Allow admins to assign specific Case Export Templates to individual projects and set a per-project default template. This enables different projects to surface only the templates relevant to their tech stack.

Problem Statement

Current Situation

With the initial Templated Export feature (#83), all enabled export templates are available globally across every project. A team using Playwright sees Cypress and WebdriverIO templates they'll never use, and vice versa.

Desired Outcome

Project admins can configure which export templates appear for their project and designate a project-specific default. When users export test cases, they only see the templates assigned to that project, with the project default pre-selected.

Proposed Solution

Schema Changes

  • New join model CaseExportTemplateProjectAssignment linking CaseExportTemplate to Project (follows the existing TemplateProjectAssignment pattern for case field templates)
  • Add a defaultCaseExportTemplate relation on Project (or a boolean flag on the assignment) to track which template is the project default

Admin UI

  • In the project settings or admin area, add a section to manage which export templates are assigned to the project
  • Allow selecting a default template per project
  • If no templates are explicitly assigned, fall back to showing all enabled templates (backward compatible)

Export Dialog

  • Filter the template dropdown to only show templates assigned to the current project
  • Pre-select the project's default template (falling back to the global default if none is set)

Acceptance Criteria

  • Many-to-many assignment between CaseExportTemplate and Project via a join model
  • Admin UI to assign/unassign export templates to a project
  • Ability to set a default export template per project
  • Templated Export dialog only shows templates assigned to the current project
  • If no templates are assigned to a project, all enabled templates are shown (backward compatible)
  • Project default template is pre-selected in the export dialog

Related Issues

Implementation Effort

  • Small (1-2 days)
  • Medium (3-5 days)
  • Large (1-2 weeks)
  • Extra Large (>2 weeks)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions