In the Workflow, when a user selects the Reject action, the system should require the user to provide a reason for rejection.
Currently, the user can reject the document directly without entering any reason.
Expected behavior:
- User clicks Reject.
- System displays a pop-up/dialog box asking for the rejection reason.
- The rejection reason should be mandatory.
- User should not be able to complete the rejection without entering a reason.
- The entered reason should be saved against the document for future reference/audit purposes.
- Ideally, the rejection reason should also be visible in the document’s timeline/history.
Example:
Reject Document
Rejection Reason: [Enter reason]
Cancel | Reject
If the user clicks Reject without entering a reason, the system should display a validation message such as:
“Please enter a rejection reason before rejecting this document.”