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

EH-1700: Give zero duration if jakso is not found from eHOKS #289

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

severij
Copy link
Contributor

@severij severij commented Sep 18, 2024

@severij severij force-pushed the severij/kestojen-uudelleenlaskenta branch from cc39f2a to ec4b7c0 Compare September 18, 2024 09:14
Copy link
Contributor

@pkalliok pkalliok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jesjes.

@@ -42,7 +42,7 @@
kestot (nh/oppijan-jaksojen-kestot
concurrent-jaksot opiskeluoikeudet)
jakso-key (nh/ids jakso)]
(if-let [new-kesto (get kestot jakso-key)]
(if-let [new-kesto (get kestot jakso-key 0)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tää on sikäli bugialtista, että olis kuviteltavissa, että kestot-mapista puuttuu kyseinen avain jostain muusta syystä kuin siksi, että kesto yritettiin laskea mutta epäonnistuttiin. Mun puolesta näin voi tehdä, mutta enemmän eksplisiittisiä mahdollisuuksia olis esim. että oppijan-jaksojen-kestot laittais kestot-mappiin jonku :jaksoa-ei-loydy-keywordin numeron sijaan silloin ku laskennassa on joku ongelma.

Vakavuus: ehdotus

@severij severij force-pushed the severij/kestojen-uudelleenlaskenta branch from 1f4d2df to c0fe972 Compare September 18, 2024 10:21
Copy link
Contributor

@pkalliok pkalliok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joo, tää on parannus.

(if-let [new-kesto (get kestot jakso-key)]
jakso-key (nh/ids jakso)
new-kesto
(if (find-first #(= (:hankkimistapa_id %)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tähän käy myös some, joka on semanttisesti lähempänä

vakavuus: idea

jakso-key (nh/ids jakso)
new-kesto
(if (find-first #(= (:hankkimistapa_id %)
(:hankkimistapa_id jakso))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Onko mahdollista, että nämä yhtaikaiset jaksot ovat eri HOKSeista? Silloin pitää verrata koko (nh/ids jakso):a.

vakavuus: jos on mahdollista että ovat eri HOKSeista, pyyntö.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kai se teoriassa on 🤔 Korjaan!

@severij severij force-pushed the severij/kestojen-uudelleenlaskenta branch 8 times, most recently from 0bd92fc to 51aedb2 Compare September 18, 2024 12:48
@severij severij force-pushed the severij/kestojen-uudelleenlaskenta branch from 51aedb2 to 67e671b Compare September 18, 2024 12:55
@severij severij merged commit eb89444 into master Sep 18, 2024
2 checks passed
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.

2 participants