Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The following requirement comes from #2553935: Add a comment field to each time slot (D7):
I have a requirement to add a new field in each time slot to show users which services has been offered on that respective shift.
The code from that D7 issue is implemented her for D8
Comments
Comment #3
johnvCommitted with attribution.
Thanks ripz0r, nice feature, which was on the bucket list a long time.
Comment #4
micahw156I just updated one of our Drupal 8 sites to office_hours-8.x-1.0-alpha1 and ran the database updates. office_hours_update_8003() did not properly extend the schema of my office hours fields.
This site has four fields with office_hours type:
Update 8003 specifically looks for tables matching %office_hours% and adds a field field_office_hours_comment to any found. This would presumably find the node__field_office_hours and node_revision__field_office_hours tables for a field named office_hours but does not work in this case.
Those table names don't match the field names above, and the schema field names should be field_winter_hours_comment, etc, as well.
The corresponding D7 update from #2553935: Add a comment field to each time slot (D7) uses a different process to identify and update tables, and does not appear to have this problem.
I don't have time to work up a proper patch right now, but I think the replacement update could do something like this to find the tables and field names that need updating:
Comment #6
johnvThis should to the trick. I'll provide a new version.
Thanks for the fast response.