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

fix timestamp mapped attribute cases #1593

Merged
merged 21 commits into from
Apr 17, 2024

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Apr 3, 2024

#1557

This PR includes fixes and includes two new cases

  • Timestamp mapped attribute
  • Timestamp mapped attribute with expression to fix a bad format

@AlvaroVega AlvaroVega marked this pull request as ready for review April 4, 2024 09:22
@AlvaroVega AlvaroVega changed the title add test case about attribute mapped to timestamp fix timestamp mapped to attribute Apr 4, 2024
@AlvaroVega AlvaroVega changed the title fix timestamp mapped to attribute fix timestamp mapped attribute Apr 4, 2024
@AlvaroVega
Copy link
Member Author

AlvaroVega commented Apr 5, 2024

We should include tests about include also:

  • explicitAttrs derivations of these cases

  • timestamp measure is sent with attributed mapped to timestamp

  • And maybe move block where timestamp is processed to the end

@AlvaroVega AlvaroVega changed the title fix timestamp mapped attribute fix timestamp mapped attribute cases Apr 9, 2024
return;
}
} else {
if (!typeInformation.timezone) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this could be precalculated to simplify logic and optimize. Minor.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 4c8a624

jexlctxt[constants.TIMESTAMP_ATTRIBUTE] = timestamp.value; // nosense
} else {
timestamp.value = moment().tz(typeInformation.timezone).format('YYYY-MM-DD[T]HH:mm:ss.SSSZ');
jexlctxt[constants.TIMESTAMP_ATTRIBUTE] = timestamp.value; // nosense
Copy link
Member Author

Choose a reason for hiding this comment

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

jexlctxt is not used any more from this point

@AlvaroVega AlvaroVega requested a review from fgalan April 17, 2024 09:24
doc/api.md Outdated Show resolved Hide resolved
CHANGES_NEXT_RELEASE Outdated Show resolved Hide resolved
Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

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

LGTM

@fgalan fgalan merged commit 73dbc7e into master Apr 17, 2024
5 checks passed
@fgalan fgalan deleted the fix/use_attribute_mapped_to_timestamp branch April 17, 2024 15:43
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.

None yet

3 participants