In this PR I added a lastDate value for Commons. This means I changed values in the Commons.java and CommonsController files. Furthermore in the frontend I edited the Commons form and table, admin create and edit pages. The relevant tests were added for all these changes.
Screenshots (Optional)
Future Possibilities (Optional)
Some possible points could be:
For the automatic jobs that manipulate cow health, milk the cows, etc. we should restrict which commons these are done on to only the commons that have games in progress. There is no reason to milk cows, update health, produce instructor reports etc. for a game that's already over. It's important that these activities STOP at some point, or else we'll be filling up the database with useless rows indefinitely. That's how you crash a server.
A clean start/end date will likely make future graphs and visualizations easier to make.
We may want to restrict users from joining a commons before the game start date so that the instructor can set things up in advance, but students all start at the same time.
Validation (Optional)
Download this branch.
Run on local host
Test Admin create and edit commons forms
Make sure last date is saved, by checking swagger or the table
Tests
[ ] Backend Unit tests (mvn test) pass
[ ] Backend Test coverage (mvn test jacoco:report) 100%
[ ] Backend Mutation tests (mvn test pitest:mutationCoverage) 100%
[ ] Frontend Unit tests (npm test) pass
[ ] Frontend Test coverage (npm run coverage) 100%
Overview
In this PR I added a lastDate value for Commons. This means I changed values in the Commons.java and CommonsController files. Furthermore in the frontend I edited the Commons form and table, admin create and edit pages. The relevant tests were added for all these changes.
Screenshots (Optional)
Future Possibilities (Optional)
Some possible points could be:
For the automatic jobs that manipulate cow health, milk the cows, etc. we should restrict which commons these are done on to only the commons that have games in progress. There is no reason to milk cows, update health, produce instructor reports etc. for a game that's already over. It's important that these activities STOP at some point, or else we'll be filling up the database with useless rows indefinitely. That's how you crash a server.
A clean start/end date will likely make future graphs and visualizations easier to make.
We may want to restrict users from joining a commons before the game start date so that the instructor can set things up in advance, but students all start at the same time.
Validation (Optional)
Tests
mvn test
) passmvn test jacoco:report
) 100%mvn test pitest:mutationCoverage
) 100%npm test
) passnpm run coverage
) 100%npx stryker run
) 100%npx eslint --fix src
)Linked Issues
Closes #15