Skip to content

[API] Incorrect saving of the 'dateTimeRanges' field when sending bits as the values of the days of the week. #1994

@Yana-Iv

Description

@Yana-Iv

Environment: Windows 10 (v.:1809), Google Chrome (v.: 141.0.7390.76 ) +DevTool; Postman(desktop)
Reproducible: always
Build found: commit a34b13c

Preconditions

  1. Go to https://pozashkillia-test.iea.gov.ua/#/
  2. Open DevTool.
  3. Open Postma. Authorize as the Service Provider in the 'Postman' tool.
  4. Select the 'POST' method for https://pozashkillia-test.iea.gov.ua/web/api/v2/WorkshopDraft/Create in the 'Postman' tool.
  5. Select 'form-data' content-type for Body.
    Request(for exsample)

title:Гурток "Веселі та сумні" one, two , three, one, two , three.Гурток "Веселі та сумні" one, two , three, one, two , three
shortTitle:Супер пупер назва 'Title'1234
noAgeRestrictions:true
dateTimeRanges:[{"workdays":["monday","wednesday"],"startTime":"12:00","endTime":"13:00"}]
studyPeriodDates:{"startDate":"2025-09-11","endDate":"2025-09-18"}
languageOfEducationId:1
formOfLearning:Offline
availableSeats:4294967295
workshopDescriptionItems:[{"sectionName":"Супер пупер назва 'Title'1234","description":"Супер пупер назва 'Title'1234Супер пупер назва 'Title'1234Супер пупер назва 'Title'1234Супер пупер назва 'Title'1234Супер пупер назва 'Title'1234"}]
institutionId:b929a4cd-ee3d-4bad-b2f0-d40aedf656c4
institutionHierarchyId:d5b90591-887f-4c83-9d18-dba4894f212b
keywords:[]
teachers:[]
providerId:08da842d-12fc-4865-85c5-ec6e6142abad
providerTitle:Дісней Пікчерз нє прдєставляєт!!!
specialNeedsType:None
educationalShift:First
ageComposition:SameAge
workshopType:Workshop
coverage:School
contacts:[{"title":"dfhdfbh","address":{"street":"Тестова","buildingNumber":"1","catottgId":21800,"latitude":50.61916,"longitude":26.25235},"phones":[{"type":"тип","number":"+380656565656"}],"emails":[{"type":"тип","address":"name@example.com"}],"isDefault":false,"socialNetworks":[]}]

Scenario -I

Steps to reproduce

  1. Create the request where the 'workdays' key from the 'dateTimeRanges' array has 31-bit as the value of the array ( sum days of the week.)
  • 31
  • "31"
  1. Review the result.

Actual result
The value of the 'workdays' key from the 'dateTimeRanges' array is not correctly saved. The information on the working day of the week is not displayed on the details of the workshop page.
Image
Image

Image

Expected result
The value of the 'workdays' key from the 'dateTimeRanges' array is correctly saved, and each day of the week is saved as a separate value. The information on the working day of the week is displayed on the details of the workshop page.

Image Image

Scenario-II

Steps to reproduce

  1. Create the request where the 'workdays' key from the 'dateTimeRanges' array has 128-bit as the value of the array ( non-existent day of the week).
  • 128
  • "128"

Actual result
201-Created

Image Image Image

Expected result
400-Bad request
Error (for example): The input was not valid.

Postconditions
Delete the create workshop draft.

User story
#1534

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions