Skip to content

Automatic check_date:opening_hours on change and subkeys in check() methods#1024

Open
CeleryCrusher wants to merge 3 commits intoZverik:mainfrom
CeleryCrusher:add-checkdate-openinghours
Open

Automatic check_date:opening_hours on change and subkeys in check() methods#1024
CeleryCrusher wants to merge 3 commits intoZverik:mainfrom
CeleryCrusher:add-checkdate-openinghours

Conversation

@CeleryCrusher
Copy link

@CeleryCrusher CeleryCrusher commented Feb 17, 2026

Fixes: #966

This PR generalizes the check(), uncheck(), and togglecheck() methods in OsmChange to allow optional sub-keys and uses this to automatically add check_date:opening_hours=<Current Date> when the user has edited the opening hours and delete the key when the opening hours are deleted.

I encountered the issue of having to manually add or remove this tag every time I changed the opening hours while surveying today so automatically handling this greatly reduces friction.

This tag greatly helps the maintainability and the usability of POI data and, as mentioned in issue #966, is already automatically added in StreetComplete and used in CoMaps, so real world use is evident.

Tested on Android 16 in Android Studio.

checkdate_demo.mp4

This is my first, although simple, PR, so please tell me if something needs to be improved.

@CeleryCrusher CeleryCrusher changed the title Automatically add check_date:opening_hours on change and generalize check() method Automatic check_date:opening_hours on change and subkeys in check() methods Feb 19, 2026
@Zverik
Copy link
Owner

Zverik commented Feb 20, 2026

Hi CeleryCrusher, thanks for the pull request! I guess I'm okay with adding this change, but please fix a couple technical imperfections I've noticed.

@CeleryCrusher CeleryCrusher requested a review from Zverik February 21, 2026 13:06
@CeleryCrusher
Copy link
Author

CeleryCrusher commented Mar 5, 2026

I saw in the contributors guide to:

Please wait a few days and post a comment to your pull request to remind them.

So here is my comment. I fixed the issues you mentioned.

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.

Set check_date:opening_hours if editing opening hours

2 participants