Skip to content
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

HL-883 | Fix some issues with opening and locking application on handler's side #2181

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

sirtawast
Copy link
Collaborator

@sirtawast sirtawast commented Aug 21, 2023

Description ✨

  • Fix seeded applications not being able to be opened / locked by adding more required attachments
  • Fix all handler-generated applications throwing a validation violation by skipping user terms validation altogether
  • Add toast error reporting if something goes wrong

Note

On handler's side, there's still problems locking or opening an application when terms have been changed and old (although accepted) ones are not in effect anymore. The locking and opening action uses general PUT on /applications/{app_id}/ so it's an error prone process because of rigorous model validation. There's a new ticket for this.

There are two ways to implement a fix:

  • Make custom endpoint
    • a new field to set application lock property on/off
    • or just change application status like now (possible status transition problems might arise)
  • Loosen the requirements for term consent's approval
  • Try using a different Serializer for PATCH (partial_update) actions and implement frontend to call endpoint with PATCH instead of PUT`

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-appl is deployed to: https://helsinkibenefit-bf-appl-2181.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-hdlr is deployed to: https://helsinkibenefit-bf-hdlr-2181.test.kuva.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

Helsinkibenefit-bf-bknd is deployed to: https://helsinkibenefit-bf-bknd-2181.test.kuva.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2181.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2181.dev.hel.ninja 🚀🚀🚀

@github-actions
Copy link
Contributor

TestCafe result is success for https://helsinkibenefit-bf-appl-2181.test.kuva.hel.ninja! 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2181.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2181.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2181.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr2181.dev.hel.ninja 😆🎉🎉🎉

let's just do a custom endpoint to lock / unlock the application
@codecov-commenter
Copy link

Codecov Report

Merging #2181 (d510e25) into develop (0906362) will decrease coverage by 16.05%.
Report is 39 commits behind head on develop.
The diff coverage is 37.50%.

@@             Coverage Diff              @@
##           develop    #2181       +/-   ##
============================================
- Coverage    27.60%   11.55%   -16.05%     
============================================
  Files          764      165      -599     
  Lines        15627     4101    -11526     
  Branches      3501      943     -2558     
============================================
- Hits          4314      474     -3840     
+ Misses       10741     3492     -7249     
+ Partials       572      135      -437     
Files Changed Coverage Δ
...fit/handler/src/hooks/useUpdateApplicationQuery.ts 54.54% <37.50%> (-2.60%) ⬇️

... and 738 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2181.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2181.dev.hel.ninja 🚀🚀🚀

@sirtawast sirtawast marked this pull request as ready for review August 22, 2023 12:25
@sirtawast sirtawast changed the title HL-883 | Fix issues with opening and locking application on handler's side HL-883 | Fix some issues with opening and locking application on handler's side Aug 22, 2023
@sirtawast sirtawast changed the base branch from develop to main August 28, 2023 07:57
@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2181.api.dev.hel.ninja/healthz 🚀🚀🚀

@sonarcloud
Copy link

sonarcloud bot commented Aug 28, 2023

[yjdh] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2181.dev.hel.ninja 🚀🚀🚀

@sonarcloud
Copy link

sonarcloud bot commented Aug 28, 2023

[yjdh] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarcloud
Copy link

sonarcloud bot commented Aug 28, 2023

[yjdh] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sirtawast sirtawast merged commit c86d24c into main Aug 29, 2023
54 of 58 checks passed
@sirtawast sirtawast deleted the hl-883 branch August 29, 2023 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants