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

FAIRSPC-68: fixed date filter for Jena #1524

Merged
merged 1 commit into from
May 28, 2024
Merged

FAIRSPC-68: fixed date filter for Jena #1524

merged 1 commit into from
May 28, 2024

Conversation

tgreenwood
Copy link
Contributor

@tgreenwood tgreenwood commented May 27, 2024

The bugfix found on a datamodel where we define some attributes as date fields. The whole application operates with datetime format (front-end with its Date type, back-end with Instant/timestamp for Postrgres) while in Jena we use date format. But all mappings for Jena map data type to date time. It wouldn't be an easy way to switch to pure date format everywhere (especially because we do not support data model evolution within data model versioning).

I suggest then just to add handling datetime for Jena in one place instead of reworking it in multiple places with un-answered question about how easily to deploy it to already existing environments with datetime formats.

@tgreenwood tgreenwood added the bugfix Pull request that fixes a bug label May 27, 2024
@tgreenwood tgreenwood self-assigned this May 27, 2024
@tgreenwood tgreenwood force-pushed the bugfix/FAIRSPC-68 branch 3 times, most recently from 0eeca54 to 834904c Compare May 27, 2024 12:48
case Date -> makeDateTime(convertDateValue(o.toString()));
// Extract date only as it comes in format "yyyy-MM-dd'T'HH:mm:ss.SSSX"
// Leave it as is in case of adding new DateTime filter format
case Date -> makeDate(o.toString().split("T")[0]);
Copy link
Member

Choose a reason for hiding this comment

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

I haven't tested it, but wouldn't it leave yyyy-MM-dd' after the split (with an apostrophe ' at the end)?

But it looks like the format that it actually comes in is without ' ' around T, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's confusing, agree. I removed the quotes in the comment as request does not contain them. It was an unlucky attempt to highlight

@tgreenwood tgreenwood force-pushed the bugfix/FAIRSPC-68 branch from 834904c to 70357bd Compare May 27, 2024 18:01
@tgreenwood tgreenwood merged commit 12f6de5 into dev May 28, 2024
6 checks passed
@ewelinagr ewelinagr deleted the bugfix/FAIRSPC-68 branch July 23, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants