-
Notifications
You must be signed in to change notification settings - Fork 10
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 970 open ahjo case #2519
Hl 970 open ahjo case #2519
Conversation
4412dc8
to
37e2e81
Compare
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
37e2e81
to
2bad780
Compare
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
2bad780
to
1859a89
Compare
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
1859a89
to
4f9966e
Compare
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
e93a2d3
to
ca33899
Compare
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
487fb89
to
93e852b
Compare
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
[yjdh] Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
[yjdh] Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
[yjdh] Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
[yjdh] Kudos, SonarCloud Quality Gate passed! |
API branch is deployed to platta: https://helsinkilisa-pr2519.api.dev.hel.ninja/healthz 🚀🚀🚀 |
APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr2519.dev.hel.ninja 😆🎉🎉🎉 |
Description ✨
Adds an API_BASE_URL to get absolute url for the api endpoints.
Adds a service
applications.services.ahjo_payload
with functions to generate the Ahjo request Json payload.Adds function
do_ahjo_request_with_json_payload()
toahjo_integration.py
for performing the open case request to Ahjo.Adds a function
open_case_in_ahjo()
which handles the sending of the case open request.Issues 🐛
The various hard-coded string values such as Subject and ClassificationTitle etc. in the Json payload should possibly be localized and/or configured as enums.
The
do_ahjo_request_with_form_data()
andencode_multipart_formdata()
functions are possibly redundant as the Json payload seems to work fine now. Perhaps remove them later, when 100% sure that the Json payload works with all bells and whistles.Testing ⚗️
Manually testing the request from the shell:
Turn VPN on.
Add ahjo_code to ahjo_settings via the Django admin.
Instructions for configuring the Ahjo authentication can be found here
Run:
python manage.py seed
python manage.py shell_plus
from applications.services.ahjo_integration import open_case_in_ahjo
from applications.enums import ApplicationStatus
application = Application.objects.filter( status=ApplicationStatus.ACCEPTED).prefetch_related("attachments", "calculation", "company").first()
`AhjoStatus.objects.create(application=application, status=AhjoStatusEnum.SUBMITTED_BUT_NOT_SENT_TO_AHJO)
User.objects.filter(id=application.calculation.handler.id).update(ad_username="kissa123")
open_case_in_ahjo(application.id)
Screenshots 📸
Additional notes 🗒️