Aman-Mittal opened a new issue, #787:
URL: https://github.com/apache/fineract-backoffice-ui/issues/787
## Summary
The Scheduler Jobs screen can list jobs, run selected jobs and show run
history, but it can't **edit** a job. An administrator can't change when a job
runs (its cron expression), and can't deactivate or reactivate a single job.
The only control available is starting or stopping the whole scheduler.
## Evidence (`main` @ `8da1086f`)
`api-surface.json` `SCHEDULERJOBService` lists `getJobs`,
`getJobsJobIdRunhistory` and `postJobsJobId` (run). It has no `putJobsJobId`
and no `getJobsJobId`. `src/app/features/system/scheduler-jobs/` has a list and
a history component, but no edit form.
## Platform support
- `GET /v1/jobs/{jobId}` (and `/v1/jobs/short-name/{shortName}`) returns one
job.
- `PUT /v1/jobs/{jobId}` (and by short name) accepts `displayName`,
`cronExpression` and `active` (`SchedulerJobApiResource`).
## Proposed implementation
- Add an **Edit** row action that opens a small form with display name, cron
expression and active toggle.
- Validate the cron expression client-side using Quartz syntax, which has
six or seven fields including seconds. Show the next three fire times as a
preview.
- Show "currently running" jobs read-only.
## RBAC
| Action | Permission code | Typically granted to |
|---|---|---|
| View jobs / history | `READ_SCHEDULER` | system administrators,
operations, auditors |
| Run a job now (existing) | `EXECUTEJOB_SCHEDULER` | operations |
| Edit cron / active flag | `UPDATE_SCHEDULER` | system administrator only |
All codes are in `scripts/permission-codes.json`.
- Writes pass with the exact code **or** `ALL_FUNCTIONS`.
- Changing a job's schedule can silently stop interest posting, accruals or
COB. Restrict it to administrators, and make it a natural maker-checker
candidate (`UPDATE_SCHEDULER_CHECKER`).
- The UI must keep `EXECUTEJOB_SCHEDULER`-only operators from seeing the
Edit action.
### UI expectations
- Guard the edit route with `permissionGuard` (`UPDATE_SCHEDULER`).
- Gate the row action with `[appRequiresPermission]`.
## Acceptance criteria
- [ ] A job's cron expression and active flag can be changed, and the list
shows the new next-run time.
- [ ] Invalid cron expressions are caught before submit.
- [ ] Edit is gated on `UPDATE_SCHEDULER`.
- [ ] Unit tests cover the payload, the validation and the gating.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]