File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import copy
34import json
45import platform
56import warnings
@@ -810,8 +811,21 @@ def _get_graphql_projects(
810811 for project in parsed_data ["projects" ]:
811812 if active is not None and active is not project ["active" ]:
812813 continue
813- if own_attributes :
814- fill_own_attribs (project )
814+
815+ all_attrib = project .get ("allAttrib" )
816+ if isinstance (all_attrib , str ):
817+ all_attrib = json .loads (all_attrib )
818+ project ["allAttrib" ] = all_attrib
819+
820+ if own_attributes and all_attrib :
821+ own_attrib = {}
822+ if all_attrib :
823+ own_attrib = copy .deepcopy (all_attrib )
824+ attrib = project .get ("attrib" , {})
825+ for key in attrib .keys ():
826+ own_attrib .setdefault (key , None )
827+ project ["ownAttrib" ] = own_attrib
828+
815829 self ._fill_project_entity_data (project )
816830 yield project
817831
Original file line number Diff line number Diff line change @@ -2425,8 +2425,11 @@ def _prepare_fields(
24252425 fields .remove ("attrib" )
24262426 fields |= self .get_attributes_fields_for_type (entity_type )
24272427
2428- if own_attributes and entity_type in {"project" , "folder" , "task" }:
2429- fields .add ("ownAttrib" )
2428+ if own_attributes :
2429+ if entity_type == "project" :
2430+ fields .add ("allAttrib" )
2431+ elif entity_type in {"folder" , "task" }:
2432+ fields .add ("ownAttrib" )
24302433
24312434 if entity_type != "project" :
24322435 return
You can’t perform that action at this time.
0 commit comments