Forum

[SOLVED] Find from ...
 
Notifications
Retirer tout

[SOLVED] Find from API the working days for a given resource in a week

20 Posts
2 Utilisateurs
0 Reactions
6,916 Vu
(@cmarti)
Posts: 65
Active Member
Début du sujet
 

I've just did the change on model/CalendarDefinition.php (Construct function), but it didn't change the final result.

It seems to me that the point is on the "jsonDumpObj" function (tool/jsonFunctions.php) where the filter is done on the hidden attribute

if (is_object($val)) {
  if ($res!="") {
    $res.=", ";
  }
  $res.=jsonDumpObj($val, true);
} else if (pq_substr($fld, 0, 1)=='_' or $obj->isAttributeSetToField($fld, 'hidden') or $obj->isAttributeSetToField($fld, 'noExport') or $fld=='apiKey' or $fld=='password' or $included and ($fld=='id' or $fld=='refType' or $fld=='refId' or $fld=='refName' or $fld=='handled' or $fld=='done' or $fld=='idle' or $fld=='cancelled')) {
  // Nothing
} else { 

I can't see the influence of the forceExport so I doubt that it is really change the behavior

But by filtering the hidden by the forceExport I can see all the dayOfWeek items

    } else if (pq_substr($fld, 0, 1)=='_' or ($obj->isAttributeSetToField($fld, 'forceExport')== false and $obj->isAttributeSetToField($fld, 'hidden')) or $obj->isAttributeSetToField($fld, 'noExport') or $fld=='apiKey' or $fld=='password' or $included and ($fld=='id' or $fld=='refType' or $fld=='refId' or $fld=='refName' or $fld=='handled' or $fld=='done' or $fld=='idle' or $fld=='cancelled')) {

But obviously I do not know the full effect of such change on the whole software.

Hope this help


 
Posté : 20 Déc AM 11:1212
(@babynus)
Posts: 14952
Membre Admin
 

Yes, this is the good way to fix this


 
Posté : 20 Déc PM 13:1212
(@cmarti)
Posts: 65
Active Member
Début du sujet
 

Thank you for your feed-back.

When do you think it will be integrated on the main source?
I've tried on a test database, but do not want to mess-up on the main one.

 


 
Posté : 20 Déc PM 15:1212
(@babynus)
Posts: 14952
Membre Admin
 

It will be deployed on V10.2.1


 
Posté : 20 Déc PM 16:1212
(@cmarti)
Posts: 65
Active Member
Début du sujet
 

That's Perfect.
thank you.
 


 
Posté : 20 Déc PM 16:1212
Page 2 / 2
Share:
Retour en haut