Entitlement approve validation improvements
Why is this change needed?
It is possible to approve the entitlement even though the cycle is not yet approved
How was the change implemented?
Added a validation in approving entitlements where it will not proceed in approving if the cycle is still not approved.
New unit tests
spp_programs/tests/test_entitlement.py::TestEntitlement::test_12_approve_entitlement
Unit tests executed by the author
spp_programs/tests/test_entitlement.py::TestEntitlement
How to test manually
-
Install spp_programs module
-
Create a program
-
Create a cycle under the program
-
Enter the cycle
-
Click
Prepare Entitlementbutton. -
Enter Entitlement page using the Entitlement button in the top-center page.
-
Either approve one or all of the entitlements.
-
Check if an error shows
-
Go back to Cycle and approve it
-
Go back to Entitlements page and approve them
-
Check if there is no error anymore
Related links
https://github.com/OpenSPP/openspp-modules/issues/538
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code