cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
187
Views
5
Helpful
0
Replies
Highlighted
Beginner

CCX Calendar API seems to accept inconsistent data (Fixedhours calendar with non-fixed hours)

Hello there, as pointed out in the title, in CCX 12.5 I can create calendars like the following with a POST call:

 

<calendar>
  <name>Test</name>
  <timeZone>Europe/Rome</timeZone>
  <description>Test</description>
  <calendarType>FIXEDHOURS</calendarType>
  <businessDays>
    <businessDay>
      <dayOfWeek>MON</dayOfWeek>
      <intervals>
        <interval>
          <name>Time Range 1</name>
          <startTime>08:00</startTime>
          <endTime>21:00</endTime>
        </interval>
      </intervals>
    </businessDay>
    <businessDay>
      <dayOfWeek>TUE</dayOfWeek>
      <intervals>
        <interval>
          <name>Time Range 1</name>
          <startTime>08:00</startTime>
          <endTime>21:00</endTime>
        </interval>
      </intervals>
    </businessDay>
    <businessDay>
      <dayOfWeek>WED</dayOfWeek>
      <intervals>
        <interval>
          <name>Time Range 1</name>
          <startTime>08:00</startTime>
          <endTime>21:00</endTime>
        </interval>
      </intervals>
    </businessDay>
    <businessDay>
      <dayOfWeek>THU</dayOfWeek>
      <intervals>
        <interval>
          <name>Time Range 1</name>
          <startTime>08:00</startTime>
          <endTime>21:00</endTime>
        </interval>
      </intervals>
    </businessDay>
    <businessDay>
      <dayOfWeek>FRI</dayOfWeek>
      <intervals>
        <interval>
          <name>Time Range 1</name>
          <startTime>07:00</startTime>
          <endTime>22:00</endTime>
        </interval>
      </intervals>
    </businessDay>
  </businessDays>
  <holidays>
    <holiday>
      <name>Christmas</name>
      <date>2021-12-25</date>
    </holiday>
  </holidays>
  <associations/>
</calendar>

Strangely enough, I've just created a Fixedhours calendar with non-fixed hours (see Friday compared to the rest). I'm wondering if this is a bug and how the CCX would manage a calendar like this one.

 

EDIT:

As per my question:

 

I'm wondering [...] how the CCX would manage a calendar like this one.

 

It looks like the CCX just considers this fixed-non-fixed calendar as a fixedhours calendar using the time range of the first day for all the days entered. I guessed that opening the calendar in the Web interface of the CCX and looking in the calendar created via the API.

EDIT 2:

Another strange thing happens when I post holydays in the past. Harnessing APIs, I can insert Holydays in the past (with a PUT call). This is usually not allowed. E.g.,

    <holiday>
      <name>Christmas</name>
      <date>2020-12-25</date>
    </holiday>

... this should not happen. Overall, it looks like there isn't a proper server side validation or, at least, the validation isn't consistent with the rules described in the guide and implemented in the CCX web interface.

0 REPLIES 0
Content for Community-Ad