Redirecting a request to head TA/lecturer
What does this mr do?
Closes #628
This MR adds the option for TAs to forward requests to all head TAs and lecturers (but not simple TAs) without choosing the specific head TA/lecturer. Then the forwarded request is visible only to [and can only be picked up by] head TAs and lecturers.
Screenshots
after
We now have a new option in the forwarding dropdown:
A simple TA does not see that forwarded request:
Request indicates that it was forwarded to head TAs/teachers:
Does this MR meet the acceptance criteria?
-
I have added a changelog entry to reflect the significant changes I made. -
Tests were created to test the feature. -
I have updated the documentation accordingly. -
I adhere to the style guide.
Merge request reports
Activity
assigned to @rgiedryte
Rūta Giedrytė, this merge request has policy violations and errors. To unblock this merge request, fix these items:
- Resolve all violations in the following merge request approval policies: Security check.
- Resolve the errors and re-run the pipeline. If you think these items shouldn't be violations, ask eligible approvers of each policy to approve this merge request.
Errors- There is a mismatch between the scans of the source and target pipelines. The following scans are missing: Sast
Comparison pipelinesEdited by GitLab Security Bot- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė
Generally looks good. I have a question about the constant switching between string literals and enums. This can cause bugs down the line if we are not careful about how we maintain the mappings. It would be better if we keep everything as an enum. Is there motivation as to why keeping it separate as a string would be good? The main issue I have with how it is implemented right now is that there are custom string literals scattered everywhere.
Let's use the existing
RequestStatus
as an example:1.) They are inherently serialisable, which means when you send a websocketmessage, you don't have to specify an explicit conversion.
public class RequestCreatedMessage extends View<LabRequest> implements LabRequestMessage { private static final long serialVersionUID = -3558345410667448241L; private Long id; ... private RequestStatus status;
2.) You can persist them using the actual value name in JPA by using
@Enumerated(EnumType.STRING)
@NotNull @Enumerated(EnumType.STRING) private RequestType type;
Furthermore, if we wanted to define custom values for our enum function (not that we would want to in this case), we can do something like this without having to update every other string literal in our code.
https://stackoverflow.com/questions/60500739/storing-enum-custom-values-with-jpa
What this does change though is that in cases where its not actually being forwarded, you MAY need some sort of default value in the enum to reflect this. I say may because I don't actually know if its required.
Edited by Henry Page
- Resolved by Henry Page
- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė
- Resolved by Rūta Giedrytė