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.
Hello,
If these indicators are exposed we could use them in Views and Search API.
Comment | File | Size | Author |
---|---|---|---|
#6 | office_hours_1895608.patch | 2.03 KB | johnv |
Comments
Comment #1
johnvDon't know how to do that. Can you provide a patch? Thanks.
Comment #2
giorgio79 CreditAttribution: giorgio79 commentedWill try to poke around :)
Comment #3
johnvComment #4
giorgio79 CreditAttribution: giorgio79 commentedBeen researching this. Here is a cool example on how the range module did this #1872194: Add support for Search API
Comment #5
johnvSee also #1958176: Views D7 & Field cache for 'Currently Open/Closed' Status formatter ?
Comment #6
johnvA first attempt.
Comment #7
giorgio79 CreditAttribution: giorgio79 commentedThis looks real good. Will be checking it out soon.
Comment #8
Pls CreditAttribution: Pls as a volunteer commentedWIll review patch this weekend. Looks good from first look. Thanks :)
Comment #9
Pls CreditAttribution: Pls as a volunteer commentedManually applied the patch and it looks to be inactive. Indexed currentstatus field, but no values are returned by _office_hours_get_current_status, which looks to me not right for a purpose.
Not sure why this is declared as integer field. Maby it should be boolean, so that it would return TRUE when currently open, otherwise FALSE when not.
This patch seems to be almost identical to https://www.drupal.org/node/1872194#comment-6969684, which is for range filtering rather than getting status. This needs refactoring, I will try to get something going this month as we need this functionality on our project. Other patches are also welcome :)
Comment #10
johnvGiven the life cycle of D7, this issue is considered closed. However, patches are appreciated.