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

learningpath-api: Adds madeAvailable field to learningpaths #547

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

jnatten
Copy link
Contributor

@jnatten jnatten commented Nov 25, 2024

This field updates whenever a learningpath's status has been set to
UNLISTED or PUBLISHED.
This sets `madeAvailable` to the same as `lastUpdated` for those
learningpaths that are `UNLISTED` or `PUBLISHED`
protected def convertColumn(document: String): String = {
val oldLp = CirceUtil.unsafeParseAs[LearningPath](document)
val madeAvailable = oldLp.status match {
case UNLISTED | PUBLISHED => Some(oldLp.lastUpdated)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dette kan vel i teorien være løgn dersom den har blitt oppdatert og republisert, men det er kanskje greit?

Copy link
Member

@gunnarvelle gunnarvelle left a comment

Choose a reason for hiding this comment

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

lgtm

@jnatten jnatten merged commit fb54c7e into master Nov 25, 2024
23 checks passed
@jnatten jnatten deleted the learningpath-made-available-date branch November 25, 2024 10:51
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