fedora-infra/fedocal — pull request #39 by abadger (2013-10-16 01:37:01+00:00)
Title: Feature/optional full day

== Problem ==

Many Meeting.get_* methods have a full_day parameter. This parameter allows the user to specify whether to retrieve meetings that are marked full day (ex: a conference) or partial day (ex: fesco meeting). But, many times we also want to know whether a meeting occurs on a date without regard to full or partial. With the current code we end up calling these methods twice, once for full_day meetings and once for partial day meetings.

== Proposed solution ==

Modify all of the Meeting.get_* methods that have full_day parameters to use this convention:

* full_day True: only include full day Meetings
* full_day False: only include partial day Meetings
* full_day None: include both full and partial day Meetings

The default will be None.

== Changes ==

```
[x] Meeting.get_by_date()
[x] Week.get_meetings()
[x] tests
[x] Week.get_full_day_meetings()
[x] tests
[x] fedocallib.get_by_date()
: changed what's returned. Used to return only meetings that were
: partial-day. Now returns meetings that are full day as well.
: Alternate solution for issue addressed by
: https://github.com/fedora-infra/fedocal/pull/28
[x] fedocallib.get_meetings_by_date()
: Now lists full day meetings too
[x] api.api_meetings()
: Now lists full day meetings.
: Before it would list full day meetings if region was
: requested. Otherwise, only partial-day
[x] tests -- None
[x] fedocal.ical_all()
: Now lists full day meetings. Before gonly listed
: partial-day meetings
[x] tests
[x] fedocal.ical_out()
: Now lists full day meetings. Before only listed
: partial-day meetings
[x] tests
[x] tests
[x] fedocallib.agenda_is_free_in_future()
: Now takes into account full day meetings
[x] fedocallib.add_meeting()
: Would now consider full day meetings as conflicting.
: Is this a problem?
[x] tests
[x] fedocallib.edit_meeting()
: Would now consider full day meetings as conflicting.
: Is this a problem?
[x] tests
[x] tests
[x] ./fedocal/__init__.py:calendar_list()
: Will now list full_day meetings as well as partial-day.
: /list/////
[x] tests
[x] tests
[x] tests
[x] Meeting.get_at_date()
[x] tests
[x] Meeting.get_active_regular_meeting()
[x] tests
[x] Meeting.get_regular_meeting_at_date()
[x] tests
[x] Meeting.get_active_regular_meeting_by_date()
[x] tests - No tests
[x] Meeting.get_regular_meeting_by_date()
[x] fedocallib.get_by_date() -- see above
[x] tests - No tests
```

You should probably see if the change makes a difference in any of the webui. Things seemed okay to me with the only questionably affected methods being add_meeting() and edit_meeting(). I'm not sure if full day meetings should or should not be factored in as conflicting there.