View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - API returns invalid result when updating Milestones - ProjeQtOr

Prochaines sessions de formation

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

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)

Mardi 23 avril (10h30-12h)

Jeudi 16 mai (16h-17h30)

Jeudi 13 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

3 et 4 avril (9h - 12h30)

 
 

Administrez avec ProjeQtOr

10 et 11 avril (9h - 12h30)

 

 

 
 

API returns invalid result when updating Milestones

More
01 Aoû 2019 20:24 #1 by phvincent
Hello Team,

I'm using Projeqtor API to manage some reporting features (mainly reading and aggregating database objects such as projects, activities, milestones, etc...).
My customer has a lot of projects and milestones. All of them are regurlaly followed-up by teams and updated according to the default workflow (i.e recorded, assigned, done, closed). Unfortunately, lots of milestones are left in done state and not closed. To avoid the burden of manually closing them in Projeqtor UI, I decided to use the API to massively change state of these old milestones from done to closed stated.

That's where is my current problem: the API always returns an INVALID result, stating that the workflow control prevents me to change the status of milestones.
For example:
Initial milestone attributes are { 'idStatus' : 4, 'doneDate' : "YYYY-MM-DD", 'idle' : 0, 'idleDate' : null, 'result' : null } -- idStatus 4 = "done"
I call API with PUTas follows:
Calling API PUT http://localhost/projeqtor/api/Milestone/
POST data: {"id":35,"idStatus":7,"idle":1,"idleDate":"2019-08-01","result":"Forced closing after 180 days"}

The API result is (PHP encoded):
Array
(
[identifier] => id
[items] => Array
(
[0] => Array
(
[apiResult] => INVALID
[apiResultMessage] => Contrôles invalides. le workflow ne vous autorise pas à passer cet élément dans cet état
[id] => 35
[reference] => -INC-0020
[name] => XXXX
. . .

The same milestone can be successfully closed in Projeqtor UI... so I'm wondering what i'm missing in API regarding the workflow control.
My current Production Projeqtor version is 7.2.7

Thank you for your advice

PVT

Please Connexion or Create an account to join the conversation.

More
02 Aoû 2019 11:11 #2 by babynus
Possibly you don't connect with same user through API as with GUI.
So profile may be different and rights to change workflow may differ.

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
02 Aoû 2019 21:59 #3 by phvincent
Thank you for replying.

Yes! My fault, I forgot this special feature where one can allow state transitions in the workflows management screen. So I put a check on my API user to allow going from done to close and it's ok.

Cheers

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.046 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.