Skip to content

temporal: prohibit writing map timestamps across mapsets#7211

Open
Dasux wants to merge 2 commits intoOSGeo:mainfrom
Dasux:fix-3394-cross-mapset-timestamp
Open

temporal: prohibit writing map timestamps across mapsets#7211
Dasux wants to merge 2 commits intoOSGeo:mainfrom
Dasux:fix-3394-cross-mapset-timestamp

Conversation

@Dasux
Copy link
Contributor

@Dasux Dasux commented Mar 22, 2026

This PR addresses issue #3394

The problem was when registering a map like lakes@PERMANENT , the temporal framework attempts to write timestamp data into the current mapset. This created an invalid map entry e.g, lakes@to_verify without the actual vector data.

image

The reason was ... the function write_timestamp_to_grass() is called without verifying that the map belongs to the current mapset.

Fix made:

Added an additional condition in the function update_absolute_time()... to verify if map is in its own mapset or not.

if (
                get_enable_timestamp_write()
                and self.get_mapset() == get_current_mapset()
            ):
                self.write_timestamp_to_grass()
            else:
                self.msgr.warning(
                    f"Skipping timestamp write for {self.get_map_id()} (different mapset)"
                )

Additional note:

I found multiple instances of write_timestamp_to_grass ... I've added the condition only in one of the methods... I wanted to confirm if this was the intended change required before proceeding with the other methods...

image

@github-actions github-actions bot added Python Related code is in Python libraries labels Mar 22, 2026
@ninsbl ninsbl changed the title Fix 3394 cross mapset timestamp temporal: prohibit writing map timestamps across mapsets Mar 22, 2026
Copy link
Member

@ninsbl ninsbl left a comment

Choose a reason for hiding this comment

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

Looks good to me. Have not tested if it completely fixes the issue. But it is an improvement in any case...

@Dasux
Copy link
Contributor Author

Dasux commented Mar 23, 2026

Thanks for the feedback,

currently it does not work as intended... lakes@to_verify still shows up in the vector list .... since i only applied the condition to one method//

I'll get back to you after i append the changes to the other methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libraries Python Related code is in Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants