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
@@ -814,8 +815,20 @@ def _get_graphql_projects(
814815 if library is not None and library is not project ["library" ]:
815816 continue
816817
817- if own_attributes :
818- fill_own_attribs (project )
818+ all_attrib = project .get ("allAttrib" )
819+ if isinstance (all_attrib , str ):
820+ all_attrib = json .loads (all_attrib )
821+ project ["allAttrib" ] = all_attrib
822+
823+ if own_attributes and all_attrib :
824+ own_attrib = {}
825+ if all_attrib :
826+ own_attrib = copy .deepcopy (all_attrib )
827+ attrib = project .get ("attrib" , {})
828+ for key in attrib .keys ():
829+ own_attrib .setdefault (key , None )
830+ project ["ownAttrib" ] = own_attrib
831+
819832 self ._fill_project_entity_data (project )
820833 yield project
821834
Original file line number Diff line number Diff line change @@ -2428,8 +2428,11 @@ def _prepare_fields(
24282428 fields .remove ("attrib" )
24292429 fields |= self .get_attributes_fields_for_type (entity_type )
24302430
2431- if own_attributes and entity_type in {"project" , "folder" , "task" }:
2432- fields .add ("ownAttrib" )
2431+ if own_attributes :
2432+ if entity_type == "project" :
2433+ fields .add ("allAttrib" )
2434+ elif entity_type in {"folder" , "task" }:
2435+ fields .add ("ownAttrib" )
24332436
24342437 if entity_type != "project" :
24352438 return
You can’t perform that action at this time.
0 commit comments