Fixes#188.
**How to test:**
1. Switch user to supervisor 'Elsabet Employee <elsabet@example.com>', she has one project to supervise: 'A bachelor thesis'.
2. Click 'Phase 2 review', and fill the form 'Rough draft approval', click button 'Request review'.
3. The next view shows the status of the review request. Since there is no reviewer assigned, the row "Deadline: ..." no longer is visible.
4. Switch user to admin, edit project 'A bachelor thesis', assign a reviewer (like 'Eric Employee') to the project.
5. Switch user back to 'Elsabet Employee', click Phase 2 review again. The deadline now shows with correct date.
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Reviewed-on: #190
Reviewed-by: Andreas Svanberg <andreass@dsv.su.se>
Co-authored-by: Tom Zhao <tom.zhao@dsv.su.se>
Co-committed-by: Tom Zhao <tom.zhao@dsv.su.se>
Fixes#144
## How to test
1. Go to https://scipro-supervisor-submit-to-examiner-date.branch.dsv.su.se
2. Log in as `einstein@example.com`
3. Open the project
4. See Galileo's date on the overview
5. Go to finishing up tab and see his date there as well
6. Go to Newtons tab and submit (it will stay in the unsubmitted view due to mocked APIs with fixed data)
7. Go to overview
8. See that Newtons submitted date is correctly shown as the moment you submitted
## Mocked APIs
This pull request will in addition to fixing #144 also set up mocked APIs for the integrations with grading service and Daisy. To use those mocked APIs remove any outside configuration (in Tomcat or otherwise) for `service.grading.url` and `daisy.api.{url,username,password}`.
To add new data to the mocked APIs see the YAML files in the `mock-api` directory. See [APImposter](https://gitea.dsv.su.se/DMC/apimposter) for more technical details how it works.
Reviewed-on: #167
Reviewed-by: Tom Zhao <tom.zhao@dsv.su.se>
Fixes#83
Basic structure to render and show a calendar for the supervisors. Currently shows only first meeting events.
## How to test
1) Log in as salieri@example.com
2) Click on the tab 'Schedule Overview'
3) Verify that there are 2 events in the calendar.
- One event has a clickable text, the other does not.
- The one that has a clickable text is associated with a project.
- The one without a clickable text is does not have a project yet.
4) Click on the clickable event to go that events project page.
5) Select 'First Meeting' tab
6) Set a new date and time for the first meeting.
7) Click on 'Schedule Overview' and verify.
After testing you can reset the state of the branch by going [here](https://gitea.dsv.su.se/DMC/scipro/actions/runs/672/jobs/0) and rerun all jobs a button top right.
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Reviewed-on: #148
Reviewed-by: Andreas Svanberg <andreass@dsv.su.se>
Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Co-committed-by: Nico Athanassiadis <nico@dsv.su.se>
Fixes#168
## How to test
1. Log in as `eric@example.com`
2. Create a thread in the forum
3. Log in as `stina@example.com`
4. Post a reply
5. Log in as `eric@example.com`
6. See that the project is flagged in the overview for having unread threads
7. Log in as `stina@example.com`
8. Delete the reply
9. Log in as `eric@example.com`
10. Project is no longer flagged as having unread threads
Reviewed-on: #169
Reviewed-by: Tom Zhao <tom.zhao@dsv.su.se>
Only threads with no replies can be deleted. When a thread is deleted a notification is sent to the relevant parties.
Fixes#139
## How to test
1. Log in as `eric@example.com` (supervisor) or as `sture@example.com` (author)
2. Open the forum in project "Putting the it in supervising"
3. Create a new thread
4. Delete the thread
5. Create a second thread
6. Post some replies as the different users
7. See that the thread (initial post) can't be deleted
8. Delete the replies
9. Delete the thread
Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: #111
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Fixes#66
Reviewed-on: #153
Reviewed-by: Andreas Svanberg <andreass@dsv.su.se>
Co-authored-by: Tom Zhao <tom.zhao@dsv.su.se>
Co-committed-by: Tom Zhao <tom.zhao@dsv.su.se>
Allows deleting (your own) forum replies.
Fixes#90
## How to test
1. Log in as `eric@example.com` (supervisor) or as `sture@example.com` (author)
2. Open the forum in project "Putting the it in supervising"
3. Create a new thread
4. Post some replies as the different users
5. Delete the replies
Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: #137
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
Allows a way to solve #119
Reviewed-on: #134
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
The seemingly unused library `jersey-hk2` that got removed in #118 is used, if present, internally by the Jersey client to find and register Jackson modules (such as those that provide `java.time` support).
## How to test
1. Turn on the `DAISY-INTEGRATION` Maven profile (alongside `DEV`)
2. Configure some projects and their authors to have a Daisy connection
3. Log in as the supervisor
4. Go to the "Finishing up" tab in the project
5. See that it works compared to `develop` branch
Reviewed-on: #132
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
Read #119 for context first
When authors select supervisor ideas during an open application period they are only allowed to select ideas corresponding to their degree type classification. This limitation can be lifted by giving the author an exemption for "Project type limitation" on the corresponding application period. However, this limitation is still enforced for any potential partner *even if* the have been given the same exemption. This change makes it so the exemption applies to any selected partner as well and not just the author selecting the supervisor idea.
## How to test
1. Log in as `oskar@example.com`
2. Go to "Ideas / My ideas" page
3. Click "Select from available ideas" on the application period "Supervisor ideas"
4. Open the one available idea
5. Try to select it with "Johan Student" as a partner
6. Log in as admin
7. Go to "Match / Application periods"
8. Click "Edit exemptions" on the "Supervisor ideas" period
9. Give "Johan Student" an exemption to "Project type limitation"
10. Repeat steps 1-5
Reviewed-on: #128
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
Since SciPro is now a Spring Boot-based application it is counter-productive to manage our own dependency versions.
* They could conflict with what Spring Boot assumes
* All libraries that are managed by Spring Boot are tested to work together
QueryDSL and JPA version properties are left in because they're needed for annotation processors (they can't be dependency managed).
Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: #124
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
Fixes#36
## How to test
1. (Optional) Log in as `sid@example.com` and submit an opposition report
1. Go to the tab "Opposition & Active participation"
2. Open the opposition "Putting the it in supervising" on the right
3. Submit the report
2. Log in as `eric@example.com`
3. Go to the final seminar in the "Putting the it in supervising" project (or follow the notification if you did step 1)
4. Request improvements
5. Log in as `sid@example.com`
6. Follow the notification to submit the new opposition report
Click the "Re-run all jobs" button (top right) on https://gitea.dsv.su.se/DMC/scipro/actions/runs/457 to reset the database. It takes a few minutes.
Reviewed-on: #78
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>
Currently there is only one class used to add test data; [`DataInitializer`](b9f7dd5a49/core/src/main/java/se/su/dsv/scipro/DataInitializer.java). That class is already very large and causes a lot of merge conflicts when multiple changes are in the pipeline as noted by #109.
This change makes it possible to have multiple classes adding test data so that each change adds its own class and thus there are no conflicts. It also has the benefit of making each class smaller and more self-contained for testing a specific feature.
Some additional infrastructure was added in the form of the `BaseData` and `Factory` (naming improvements notwithstanding) interfaces to help each class add its own test data and re-use common data.
Finally all test data related classes have been moved to their own module so they can be properly excluded when building for production but are included by default while developing.
Fixes#109
## Future work
* Add a mechanism to work with date and time.
Many processes (and therefore service method implementations) rely on the time between certain events. For example a final seminar must be scheduled a set amount of days in advance. In the ideal world, the test data is populated using these service methods to more accurately represent an achievable real world state. Therefore there must be a way to manipulate time when adding test data.
* Add more methods to the `Factory` interface as we discover more common steps that many populators must take.
* Add more base data available through the `BaseData` interface as we discover more common data that many populators need
Care must be taken that this data is final and useful in its base state since populators will rely on that state.
Co-authored-by: Nico Athanassiadis <nico@dsv.su.se>
Reviewed-on: #112
Reviewed-by: Nico Athanassiadis <nico@dsv.su.se>
Co-authored-by: Andreas Svanberg <andreass@dsv.su.se>
Co-committed-by: Andreas Svanberg <andreass@dsv.su.se>