Skip to content

fix: copy_object date range metadata copying#139

Closed
Hasakev wants to merge 35 commits into
NatLabRockies:mainfrom
Hasakev:main
Closed

fix: copy_object date range metadata copying#139
Hasakev wants to merge 35 commits into
NatLabRockies:mainfrom
Hasakev:main

Conversation

@Hasakev
Copy link
Copy Markdown
Contributor

@Hasakev Hasakev commented May 20, 2026

Summary

Resolves #138.

This PR updates copy_object so copied objects preserve date-bounded property metadata.

Previously, _copy_object_properties copied the core t_data rows and related metadata such as t_tag, t_text, and t_band, but did not copy the associated t_date_from and t_date_to rows. This meant copied objects could lose date range metadata even though the main property rows were copied successfully.

Changes

  • Added copying of t_date_from rows using the existing temp_data_mapping table.
  • Added copying of t_date_to rows using the existing temp_data_mapping table.
  • Ensured copied date metadata is linked to the newly inserted t_data rows rather than the original rows.
  • Added/updated regression coverage for copying objects with date-bounded properties.

Why

copy_object should preserve all property-related metadata so that copied objects behave the same as the source object. Without copying t_date_from and t_date_to, properties with date ranges become incomplete after copying.

Testing

  • Confirmed copy_object preserves:
    • t_data
    • t_tag
    • t_text
    • t_band
    • t_date_from
    • t_date_to
  • Confirmed existing copy behaviour remains unchanged for already-supported metadata tables.
  • Added/ran regression test for copying an object with date-bounded property values.

@mcllerena
Copy link
Copy Markdown
Contributor

mcllerena commented May 20, 2026

@Hasakev thanks for opening this PR. Could you sign your commits so that we can safely merge?

@mcllerena mcllerena self-requested a review May 20, 2026 21:45
@pesap pesap changed the title Fix: copy_object date range metadata copying fix: copy_object date range metadata copying May 20, 2026
@mcllerena mcllerena requested a review from pesap May 20, 2026 22:43
mcllerena and others added 19 commits May 21, 2026 10:20
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
#123)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
…0 to 1.22.0 (#120)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcllerena and others added 11 commits May 22, 2026 10:07
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
#123)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
…0 to 1.22.0 (#120)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Hasakev
Copy link
Copy Markdown
Contributor Author

Hasakev commented May 22, 2026

I’m going to close this PR and reopen it from a clean branch.

I’ve been having trouble getting the existing rebased commits signed/verified correctly, so rather than keep rewriting this branch, I’ll recreate the changes with a clean signed commit history.

The new PR will contain the same fix for copying date_from and date_to during object property copying.
I'll also add a test for this case.

@Hasakev Hasakev closed this May 22, 2026
@mcllerena
Copy link
Copy Markdown
Contributor

Great, thanks you!

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.

copy_object does not fully copy property metadata for copied objects

3 participants