Skip to content

[CSM Portal] add case-scoped Task visibility (list + detail) - #1194

Merged
Rashmika998 merged 5 commits into
wso2-open-operations:mainfrom
rksk:task-entity
Jul 21, 2026
Merged

Rashmika998 merged 5 commits into
wso2-open-operations:mainfrom
rksk:task-entity

Conversation

@rksk

@rksk rksk commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Purpose

CS engineers working a case in the CSM portal currently have no visibility into the case's sub-items (task-like records with a subject, state, due date, and assignee). This PR adds that visibility directly on the Case detail page. No related issue link (internal tracking only).

Goals

Add a read-only "Tasks" tab to the Case detail page that lists a case's tasks and lets an engineer open a detail dialog for a single task. This is distinct from, and does not touch, the existing Call Requests feature.

Approach

Plumbed end-to-end across all three components:

  • entity-service: new Task domain type, a service that fetches case-scoped tasks and a single task by id from the backing data source, a handler, and route wiring (GET /cases/{caseId}/tasks, GET /tasks/{id}).
  • csm-portal backend: a thin proxy (SearchCaseTasks, GetTask on the entity client; TaskHandler with matching routes) forwarding to the entity-service, with unit tests and a mock entity client.
  • csm-portal webapp: new types, two API hooks (useGetCaseTasks, useGetTask), a TasksWidget list component + TaskDetailDialog, a taskState utility for state display, and a new "Tasks" tab wired into CsmCaseDetailPage.tsx.

Scope is intentionally narrow: this is list + get-by-id only. There is no create, edit, or time-logging capability for tasks in this change.

A corresponding change on the backing data-source side (to expose task records) is tracked separately, outside this repo.

User stories

As a CS engineer viewing a case, I can see its associated tasks (subject, state, due date, assignee) and open any one of them for more detail, without leaving the case detail page.

Release note

Adds a read-only "Tasks" tab to the Case detail page in the CSM portal, showing a case's sub-items and a detail view for each.

Documentation

N/A — internal CS-engineer portal feature; no external/product docs impacted.

Training

N/A — no training content impact.

Certification

N/A — no certification exam impact.

Marketing

N/A — internal tooling feature, not customer-facing.

Automation tests

  • Unit tests
    • entity-service: service/handler tests for case-task listing and single-task retrieval.
    • csm-portal backend: tasks_test.go covering the new handler against a mocked entity client, plus updated helpers_test.go mock.
    • webapp: TasksWidget.test.tsx covering list rendering states.
  • Integration tests
    • Manually verified end-to-end against real ServiceNow DEV data through the full stack (entity-service -> backend -> webapp), including a live browser check: a real case with exactly 7 tasks rendered with an exact count match, and the task detail dialog opened and displayed correctly.

Security checks

  • Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes
  • Ran FindSecurityBugs plugin and verified report? N/A for Go/TypeScript — ran go vet (entity-service, csm backend) and eslint/tsc (webapp) clean instead
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes

Samples

N/A — no new samples.

Related PRs

Stacked alongside #1192 (change request approval-stage visibility) and #1193 (Problem management list/detail views), all part of the same CSM-portal read-visibility workstream this session. No direct code dependency between them.

Migrations (if applicable)

N/A — no schema/data migration; purely additive read endpoints.

Test environment

Verified locally against a full local stack pointed at ServiceNow DEV (real data), Chrome (latest, macOS) for the browser check.

Learning

N/A — followed existing patterns from sibling read-visibility features (e.g. Task SLA, Problem) in this codebase for entity-service/backend/webapp layering.


Note on PR size: this PR spans 21 files across three components (entity-service, csm-portal backend, csm-portal webapp) because it's a single feature threaded through the full stack — somewhat over the usual single-PR target, consistent with the sibling Problem-detail PR (#1193, 24 files) kept as one PR for the same reason. No individual file exceeds ~240 changed/added lines.

Adds a lightweight, read-only Tasks tab on the Case detail page so CS
engineers can see the sub-items associated with a case (subject, state,
due date, assignee) without leaving the portal. Plumbed end-to-end:
entity-service task lookup against the backing data source, a thin CSM
backend proxy, and new webapp hooks/components wired into the case
detail page. List and get-by-id only; no create/edit/time-logging.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@rksk, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dae0c8a3-fffc-40c5-a6c3-c6232c9cc7aa

📥 Commits

Reviewing files that changed from the base of the PR and between 8b8b5fe and a5ea45b.

📒 Files selected for processing (21)
  • apps/csm-portal/backend/cmd/server/main.go
  • apps/csm-portal/backend/internal/entity/entity.go
  • apps/csm-portal/backend/internal/handler/helpers_test.go
  • apps/csm-portal/backend/internal/handler/tasks.go
  • apps/csm-portal/backend/internal/handler/tasks_test.go
  • apps/csm-portal/backend/openapi.yaml
  • apps/csm-portal/webapp/src/api/backend/types.ts
  • apps/csm-portal/webapp/src/constants/apiConstants.ts
  • apps/csm-portal/webapp/src/features/csm-cases/api/useGetTask.ts
  • apps/csm-portal/webapp/src/features/csm-cases/api/useSearchCaseTasks.ts
  • apps/csm-portal/webapp/src/features/csm-cases/components/TaskDetailDialog.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/TasksWidget.test.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/components/TasksWidget.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/pages/CsmCaseDetailPage.tsx
  • apps/csm-portal/webapp/src/features/csm-cases/utils/taskState.ts
  • entity-service/internal/domain/entity.go
  • entity-service/internal/handler/task_handler.go
  • entity-service/internal/server/routes.go
  • entity-service/internal/service/interfaces.go
  • entity-service/internal/service/sn_task_service.go
  • entity-service/openapi.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

rksk added 3 commits July 21, 2026 20:45
…se task list

Aligns the case-scoped task list endpoint with this codebase's established
search convention (POST .../search with a JSON body) instead of the GET with
query-param pagination it originally shipped with. Adds
SearchCaseTasksRequest, updates the handler to decode a JSON body, and has
sn_task_service build a POST request against the downstream
cases/{id}/tasks/search path with the same response shape as before.
Aligns useGetCaseTasks with this webapp's list/search convention
(POST + body payload instead of GET + query params), matching
useSearchChangeRequests/useSearchDeployments. Renamed to
useSearchCaseTasks and added BeCaseTasksSearchPayload for the
pagination body; response shape (tasks/total/offset/limit) is
unchanged.
Replace GET /cases/{caseId}/tasks?limit=&offset= with
POST /cases/{caseId}/tasks/search, matching this codebase's search
convention. The pagination is now carried in a JSON body forwarded
verbatim to the entity service, instead of query parameters.
@rksk

rksk commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed.

@Rashmika998
Rashmika998 merged commit a1e8804 into wso2-open-operations:main Jul 21, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants