Support include_subprojects flag in reports.get_all_ex endpoint

This commit is contained in:
allegroai 2023-07-26 18:30:34 +03:00
parent 8061dfedbb
commit 5239755066
2 changed files with 8 additions and 1 deletions

View File

@ -706,6 +706,13 @@ get_all_ex {
}
}
}
"999.0": ${get_all_ex."2.23"} {
request.properties.include_subprojects {
description: "If set to 'true' and project field is set then reports from the subprojects are searched too"
type: boolean
default: false
}
}
}
get_tags {
"2.23" {

View File

@ -173,7 +173,7 @@ def _delete_reports_project_if_empty(project_id):
def get_all_ex(call: APICall, company_id, request: GetAllRequest):
call_data = call.data
call_data["type"] = TaskType.report
process_include_subprojects(call_data)
# bring projects one level down in case not the .reports project was passed
if "project" in call_data:
project_ids = call_data["project"]