When the approve button is clicked, the status is changed to 'active,' the start date is set to today and the end date is set to 1 year from today (or whatever ALLOCATION_DEFAULT_ALLOCATION_LENGTH is set to). The admin should be able to set a different start and/or end date but can only do this if they do not use the 'Approve' button. When an admin selects a start date and/or end date on the allocation detail page, it is wiped out if they click on the 'approve' button. The 'update' button will save the changes properly but if the approve button is then used to change the status, it overwrites the selected dates.
Task Tests:
Sign into ColdFront as the admin user
Create a new allocation request
Navigate to the allocation requests list and click on the 'Details' button for the pending request
Select a start and/or end data and click the 'Approve' button
Verify the date(s) selected remains and is unchanged and that the status is changed to 'Active.'
If a start date is selected but no end date, the process should automatically set the end date to whatever ALLOCATION_DEFAULT_ALLOCATION_LENGTH is set to in coldfront.env (default is 365 days)
When the approve button is clicked, the status is changed to 'active,' the start date is set to today and the end date is set to 1 year from today (or whatever ALLOCATION_DEFAULT_ALLOCATION_LENGTH is set to). The admin should be able to set a different start and/or end date but can only do this if they do not use the 'Approve' button. When an admin selects a start date and/or end date on the allocation detail page, it is wiped out if they click on the 'approve' button. The 'update' button will save the changes properly but if the approve button is then used to change the status, it overwrites the selected dates.
Task Tests: