-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMI2-697: handle draft adverts #125
Conversation
Will this work for v1 schemes? On the frontend in the page 'redirect-from-find.page.tsx' we call the applicant be (/grant-adverts) which returns an isInternal field in the dto. This is then used to redirect the user to the external url:
The backend method that determines this value is:
which doesn't take into account the application status. Jamie also pointed out that in find fe (/apply/[pid]) we do the same check:
Which coincidently uses the same method doesSchemeHaveApplication(), so we need to update this to consider the status of the application |
.map(grantAdvert -> grantAdvertService.grantAdvertToDto(grantAdvert, jwtPayload.getSub(), grantSchemeId)) | ||
.map(grantAdvert -> | ||
grantAdvert.getStatus().equals(GrantAdvertStatus.PUBLISHED) ? | ||
grantAdvertService.grantAdvertToDto(grantAdvert, jwtPayload.getSub(), grantSchemeId) : null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this end up putting null values in the list? Not sure if that matters later on or not but if it does its probably not ideal
* checks scheme version instead of submission version and only returns published adverts * removed comment * updated method to check for application status * replaced null logic with filter
Description
It checks the scheme version instead of the submission version inside
addMandatoryQuestionsToSubmissionObject
andonly adds grant adverts to
grantAdvertDtos
list if it has a status of PUBLISHEDTicket # and link
TMI2-697: https://technologyprogramme.atlassian.net/browse/TMI2-697
Summary of the changes and the related issue. List any dependencies that are required for this change:
Type of change
Please check the relevant options.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes:
Unit Test
Integration Test (if applicable)
End to End Test (if applicable)
Screenshots (if appropriate):
Please attach screenshots of the change if it is a UI change:
Checklist: