View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] API : How to search activity with validatedStartDate ? - ProjeQtOr

Prochaines Sessions

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)
 

13 mai 2025 (10h30-12h)

5 juin 2025 (16h-17h30)

 
 

Planifiez avec ProjeQtOr

14 et 15 mai 2025 (9h-12h30)

18 et 19 juin 2025 (9h-12h30)

 
 

Administrez avec ProjeQtOr

20 et 21 mai (9h-12h30)

25 et 26 juin (9h-12h30)

 

 

 

[SOLVED] API : How to search activity with validatedStartDate ?

More
23 Jui 2022 12:33 #1 by iFlorian
Hi there,

When I search Activity with API with criteria like idProject and IdUser, like this :
$sql =" idProject ='5'and name='Congé Annuel'and idUser='28'";
$search_presence_activity= urlencode($sql);
it's OK, I get a result like this  : 
[b]object[/b]([i]stdClass[/i])[[i]23[/i]]
  [i]public[/i] 'identifier' => string 'id' [i](length=2)[/i]
  [i]public[/i] 'items' => 
    [b]array[/b] [i](size=13)[/i]
      0 => 
        [b]object[/b]([i]stdClass[/i])[[i]176[/i]]
          [i]public[/i] 'id' => string '275' [i](length=3)[/i]
          [i]public[/i] 'reference' => string '-TAS-150' [i](length=8)[/i]
          [i]public[/i] 'name' => string 'Congé Annuel' [i](length=13)[/i]
          [i]public[/i] 'idActivityType' => string '26' [i](length=2)[/i]
          [i]public[/i] 'nameActivityType' => string 'Tâche' [i](length=6)[/i]
          [i]public[/i] 'idProject' => string '5' [i](length=1)[/i]
          [i]public[/i] 'nameProject' => string 'Absences' [i](length=8)[/i]
          [i]public[/i] 'externalReference' => string '' [i](length=0)[/i]
          [i]public[/i] 'creationDate' => string '2022-06-23' [i](length=10)[/i]
          [i]public[/i] 'lastUpdateDateTime' => string '2022-06-23 11:40:02' [i](length=19)[/i]
          [i]public[/i] 'idUser' => string '28' [i](length=2)[/i]
          [i]public[/i] 'nameUser' => string 'NOE Alexandre' [i](length=13)[/i]
          [i]public[/i] 'idContact' => string '' [i](length=0)[/i]
          [i]public[/i] 'nameContact' => string '' [i](length=0)[/i]
          [i]public[/i] 'originType' => string '' [i](length=0)[/i]
          [i]public[/i] 'originId' => string '' [i](length=0)[/i]
          [i]public[/i] 'refName' => string 'Congé Annuel' [i](length=13)[/i]
          [i]public[/i] 'description' => string '' [i](length=0)[/i]
          [i]public[/i] 'idActivity' => string '' [i](length=0)[/i]
          [i]public[/i] 'nameActivity' => string '' [i](length=0)[/i]
          [i]public[/i] 'idStatus' => string '1' [i](length=1)[/i]
          [i]public[/i] 'nameStatus' => string 'enregistré' [i](length=11)[/i]
          [i]public[/i] 'idResource' => string '28' [i](length=2)[/i]
          [i]public[/i] 'nameResource' => string 'NOE Alexandre' [i](length=13)[/i]
          [i]public[/i] 'idMilestone' => string '' [i](length=0)[/i]
          [i]public[/i] 'nameMilestone' => string '' [i](length=0)[/i]
          [i]public[/i] 'fixPlanning' => string '0' [i](length=1)[/i]
          [i]public[/i] 'paused' => string '0' [i](length=1)[/i]
          [i]public[/i] 'handled' => string '0' [i](length=1)[/i]
          [i]public[/i] 'handledDate' => string '' [i](length=0)[/i]
          [i]public[/i] 'done' => string '0' [i](length=1)[/i]
          [i]public[/i] 'doneDate' => string '' [i](length=0)[/i]
          [i]public[/i] 'idle' => string '0' [i](length=1)[/i]
          [i]public[/i] 'idleDate' => string '' [i](length=0)[/i]
          [i]public[/i] 'cancelled' => string '0' [i](length=1)[/i]
          [i]public[/i] 'result' => string '' [i](length=0)[/i]
          [i]public[/i] 'validatedStartDate' => string '2022-06-20' [i](length=10)[/i]
          [i]public[/i] 'plannedStartDate' => string '' [i](length=0)[/i]
          [i]public[/i] 'realStartDate' => string '' [i](length=0)[/i]
          [i]public[/i] 'initialStartDate' => string '' [i](length=0)[/i]
          [i]public[/i] 'validatedEndDate' => string '2022-07-01' [i](length=1[/i]
But when I add a date criteria like "validatedStartDate" in my search criteria like this: 
$sql ="idProject ='5'and name='Congé Annuel'and idUser='28' and validatedStartDate = '2022-06-20'";
The result is empty. Why ??  Normally, I sould obtain the same résult because it's the same date as before ! 

How to obtain my activities with date criteria, please ? 
Is it possible to search activity with validated start and end date ? 
Maybe I'm doing it wrong ? 

Thank you so much in advance,

Florian

“Be a yardstick of quality. Some people aren't used to an environment where excellence is expected.” ~ Steve Jobs
"...and while some may see them as the crazy ones, we see genius, because the ones who are crazy enough to think that they can change the world, are the ones who do." ~ Think Different

Please Connexion or Create an account to join the conversation.

More
23 Jui 2022 14:30 #2 by babynus
Hi,

You cannot use in criteria fields that are not part of table activity.
validatedStartDate is part of planningelement table.

What you can possibly do is define a stored filter with the critera you need and access API using the filter id

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
23 Jui 2022 16:47 #3 by iFlorian
Ok, thank you for this information.
it's disturbing since this date is in the results.
I can close this topic now :)

Have a good day,
Florian

“Be a yardstick of quality. Some people aren't used to an environment where excellence is expected.” ~ Steve Jobs
"...and while some may see them as the crazy ones, we see genius, because the ones who are crazy enough to think that they can change the world, are the ones who do." ~ Think Different

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.032 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.