Content
View differences
Updated by Yan Zubrytskyi 1 day ago
**Steps to reproduce:**
1. Have a meeting with at least two sections and one agenda item assigned to a section
2. Call `GET /api/v3/meetings/{meeting_id}/agenda_items`
3. Find an agenda item and note the `section` link in `_links`, e.g.:
"section": {
"href": "/api/v3/meetings/3/sections/4"
}
4. Try to move this agenda item to another section using `PATCH /api/v3/meetings/{meeting_id}/agenda_items/{id}` with the body:
{
"lockVersion": 4,
"\_links": {
"section": {
"href": "/api/v3/meetings/3/sections/90"
}
}
}
**What is the buggy behavior?**
* The PATCH request returns `422 Unprocessable Content` with the following error:
{
"\_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:ResourceTypeMismatch",
"message": "For property 'section' a link like '/api/v3/meeting\_sections/:id' is expected, but got '/api/v3/meetings/3/sections/90'."
}
* The link format returned by `GET /api/v3/meetings/{id}/agenda_items` in the `_links.section.href` field (`/api/v3/meetings/{meeting_id}/sections/{id}`) is different from the format required by the PATCH endpoint (`/api/v3/meeting_sections/{id}`)
* This means the link returned by the GET response cannot be used directly to construct a valid PATCH request
* _**UPDATED**_: same problem for **post** /api/v3/meetings/{id}/agenda\_items: when user is trying to create a new agenda item in the section and uses \_links.self.href from **get** /api/v3/meetings/{id}/sections, then user receives the same error as for PATCH-request
**What is the expected behavior?**
* The `_links.section.href` format returned by `GET /api/v3/meetings/{id}/agenda_items` should be consistent with the format accepted by `PATCH /api/v3/meetings/{meeting_id}/agenda_items/{id}`
* Either the GET response should return `/api/v3/meeting_sections/{id}`, or the PATCH endpoint should accept `/api/v3/meetings/{meeting_id}/sections/{id}`
**Environment information**
* **Browser:** N/A (reproduced via API client / Postman)
1. Have a meeting with at least two sections and one agenda item assigned to a section
2. Call `GET /api/v3/meetings/{meeting_id}/agenda_items`
3. Find an agenda item and note the `section` link in `_links`, e.g.:
"section": {
"href": "/api/v3/meetings/3/sections/4"
}
4. Try to move this agenda item to another section using `PATCH /api/v3/meetings/{meeting_id}/agenda_items/{id}` with the body:
{
"lockVersion": 4,
"\_links": {
"section": {
"href": "/api/v3/meetings/3/sections/90"
}
}
}
**What is the buggy behavior?**
* The PATCH request returns `422 Unprocessable Content` with the following error:
{
"\_type": "Error",
"errorIdentifier": "urn:openproject-org:api:v3:errors:ResourceTypeMismatch",
"message": "For property 'section' a link like '/api/v3/meeting\_sections/:id' is expected, but got '/api/v3/meetings/3/sections/90'."
}
* The link format returned by `GET /api/v3/meetings/{id}/agenda_items` in the `_links.section.href` field (`/api/v3/meetings/{meeting_id}/sections/{id}`) is different from the format required by the PATCH endpoint (`/api/v3/meeting_sections/{id}`)
* This means the link returned by the GET response cannot be used directly to construct a valid PATCH request
* _**UPDATED**_: same problem for **post** /api/v3/meetings/{id}/agenda\_items: when user is trying to create a new agenda item in the section and uses \_links.self.href from **get** /api/v3/meetings/{id}/sections, then user receives the same error as for PATCH-request
**What is the expected behavior?**
* The `_links.section.href` format returned by `GET /api/v3/meetings/{id}/agenda_items` should be consistent with the format accepted by `PATCH /api/v3/meetings/{meeting_id}/agenda_items/{id}`
* Either the GET response should return `/api/v3/meeting_sections/{id}`, or the PATCH endpoint should accept `/api/v3/meetings/{meeting_id}/sections/{id}`
**Environment information**
* **Browser:** N/A (reproduced via API client / Postman)