atlassian-python-api icon indicating copy to clipboard operation
atlassian-python-api copied to clipboard

[Confluence] method get_page_properties limits the returned properties to default 10 and this cannot be changed

Open lassi-niemisto opened this issue 3 years ago • 5 comments

The function:

https://github.com/atlassian-api/atlassian-python-api/blob/889aec9370b368227cb5e94780f1bf790b99f07d/atlassian/confluence.py#L1898

does not pass the limit parameter for the rest api:

https://docs.atlassian.com/ConfluenceServer/rest/8.0.0-m90/#api/content/{id}/property

so user will get max 10 content properties returned and cannot change that. Please add optional parameter for changing the limit to a user-specified number.

lassi-niemisto avatar Nov 23 '22 15:11 lassi-niemisto

@lassi-niemisto if you fixed, please send PR :)

gonchik avatar Feb 19 '23 12:02 gonchik

@lassi-niemisto if you fixed, please send PR :)

My fix was a one-liner to just increase limit to 100. Before considering to submit a PR I would like to know if this should be configurable or fixed to a specific value, or what would be the desired design.

lassi-niemisto avatar Feb 19 '23 19:02 lassi-niemisto

Instead of passing the limit the function should do the paging and yield all properties.

Spacetown avatar Feb 19 '23 20:02 Spacetown

I do support logic of @Spacetown , as better to implement following parameters:

  • start
  • limit
  • expand

gonchik avatar Feb 19 '23 20:02 gonchik

This parameters shouldn't be added anymore since they are used for the paging which should be hidden from the user.

Spacetown avatar Feb 19 '23 20:02 Spacetown