Implement Sztab Domain Queries using `JpaSpecificationExecutor` (SZ-2)
rk@tigase.net opened 2 hours ago

Implement Sztab Domain Queries using JpaSpecificationExecutor

Goal:
Expose flexible REST API search capabilities for core domain entities using Spring Data JPA Specifications.

Estimated Time: 6–8 hours


Task Breakdown

1. Enable Specification Support
  •  Ensure all repositories extend JpaSpecificationExecutor<T>
  •  Add custom specification builders for:
    • User
    • Project
    • Issue
2. Define Filter Criteria
  •  For Issue: support filtering by
    • status
    • priority
    • severity
    • assignee
    • project
  •  For Project: support filtering by
    • startDate, endDate
    • owner
  •  For User: support filtering by
    • username, email, roles
3. Create REST Query Endpoints
  •  Add query parameters to existing GET /issues, GET /projects, GET /users
  •  Map query params to specifications dynamically
  •  Add pagination and sorting support
4. Add Integration Tests
  •  Use @SpringBootTest or @DataJpaTest to test query behavior
  •  Cover positive + negative + edge case filters
  •  Target at least 80% test coverage on query logic
5. Document Query API
  •  Update OpenAPI (Springdoc) or README with sample query formats
    • e.g. /issues?status=OPEN&priority=HIGH

Output Artifacts

  • Dynamic REST API query support for User, Project, and Issue
  • Well-tested JpaSpecification implementations
  • Updated API documentation

Notes:
Code should remain consistent with service-layer abstraction (i.e., use service methods rather than wiring specs into controllers directly).

  • rk@tigase.net commented 2 hours ago

    In progress in feature branch: feature/jpa-spec-queries

  • rk@tigase.net changed state to 'In Progress' 2 hours ago
    Previous Value Current Value
    Open
    In Progress
issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
Version
1
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
SZ-2
Please wait...
Page is in error, reload to recover