Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"all_day" : 1 seems to have no effect on create new calendar entry #358

Closed
ZacKnaus opened this issue Feb 12, 2023 · 4 comments
Closed

"all_day" : 1 seems to have no effect on create new calendar entry #358

ZacKnaus opened this issue Feb 12, 2023 · 4 comments

Comments

@ZacKnaus
Copy link

ZacKnaus commented Feb 12, 2023

Following the examples here: https://marketplace.humhub.com/module/calendar/docs/swagger/calendar.html#tag/Calendar-entry/paths/~1calendar~1container~1%7Bid%7D/post , the all_day attribute doesn't seem to have any effect when new calendar events are submitted. The server confirms receipt, sets the event on the calendar according to the submitted dates/times but the response from the server shows a 0 for all_day when a 1 is submitted. I've tried adjusting the dates/times to match other examples the above page but nothing seems to allow me to create new calendar events as all_day events.

POSTed to: https://{domain}/api/v1/calendar/container/{sleep_calendar}

example JSON that won't create an all-day event:

   {
      "CalendarEntry": {
        "title": "Sleep - 8h 40m (EXCELLENT)",
        "description": "",
        "color": "#1AA7EC",
        "all_day": 1
      },
      "CalendarEntryForm": {
        "start_date": "2023-02-10",
        "start_time": "18:00:00",
        "end_date": "2023-02-11",
        "end_time": "05:59:00",
        "timeZone": "America/New_York"
      },
      "content": {
        "topics": [
          {
            "name": "Sleep"
          }
        ]
      }
    }
@gevorgmansuryan
Copy link
Contributor

@luke- there is 3 PRs for this fix
#368
humhub/tasks#226
humhub/rest#113

@luke-
Copy link
Contributor

luke- commented Apr 11, 2023

@yurabakhtin Can you please review this? Especially humhub/rest#113

@yurabakhtin
Copy link
Collaborator

@luke- I confirm the changes in all 3 PRs. No need to keep the method prepareRequestParams completely, because it forces all_day to 0 when start or end dates are passed, that is strange, also the verifying from the method works well from calendar and task models side.

@luke-
Copy link
Contributor

luke- commented Apr 20, 2023

@yurabakhtin @gevorgmansuryan Thanks!

@luke- luke- closed this as completed Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants