Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Retrieving more than 20 collections

Avatar

Community Advisor

I have a scenario built that will periodically check for On Hold Projects which and retrieve all updates (notes) made to that project since it was put on hold. If the Project sponsor has not provided an update since it was put on hold after a given timeframe, reminders will be sent out and/or the project will be changed to Dead if no response received. 

 

The issue i'm facing is that when Fusion searches for projects and retrieves a collection of updates, no more than 20 updates are included. This poses a problem if the project sponsor responded "21 updates ago" 

 

Does anyone know if/how you can increase the limit of collections that can be retrieved?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

 

Harrumph.

 

No dice @Richard_Le_,

 

As below (for future archeologists to study), I took 9 whacks at it and at last do indeed see what you reported, but after checking my usual API nook and cranny resources, grudgingly conclude (as you did) that the limit of 20 is As Designed. I also noted that the 20 that do come back appear to be in the same most-recent-first order as we've come to expect on the Updates tab under a project, which might further imply that This Is Just How It Works (even under api-unsupported, btw).

 

So! In addition to the NOTES workaround I suggested (which does seem viable), my  other suggestion would be to use my Targeted Auditing technique to automatically capture such updates in a fit-for-purpose project level custom parameter, an perhaps add a dash of something similar to The Scoop to help display "aging" comments in a more visually obvious fashion (i.e. recent Red > aging Purple > old Blue).

 

With that, I'll file this one on my Watch list, in case someone does know of a secret syntax that's eluding us...

 

Regards,

Doug

 

 

// trying to pull more than 20 Notes as part of a proj request for Rich L

// step 1: find a project with lots of notes
https://atappstore.my.workfront.com/attask/api/note/report?fields=project:name&project:name_1_GroupBy=true&entryDate_AggFunc=max&&entryDate_AggFunc=min&entryDate_AggFunc=count

// step 2: look up the notes directly for that project ID
https://atappstore.my.workfront.com/attask/api/note/search?projectID=52a51c5900016f91f45550c3c33100fe&fields=projectID,taskID,noteText,auditText,noteObjCode

// step 3: ask for the notes as part of the proj call...RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api/proj/search?ID=52a51c5900016f91f45550c3c33100fe&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 4: count projects with non-null notes:noteText
https://atappstore.my.workfront.com/attask/api/proj/count?notes:noteText_Mod=notnull&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 5:  search projects with non-null notes:noteText STILL RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api/proj/search?notes:noteText_Mod=notnull&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 6: try api-internal STILL RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api-internal/proj/search?notes:noteText_Mod=notnull&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 7: having typed in 22 updates (notes) by hand at the project level for a particular project, search for them against the NOTES object directly (using the 2024-04-05 prefix on each such note 01, 02, ... 22) WORKS
https://atappstore.my.workfront.com/attask/api/note/search?noteText=2024-04-05&noteText_Mod=cicontains&fields=projectID,noteText

// step 8: attempt to bring those NOTES back via the proj search STILL RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api/proj/search?ID=52a51c5900016f91f45550c3c33100fe&fields=notes:noteText

// step 9: switched to UPDATES:MESSAGE instead of NOTES:NOTETEXT and at last retrieved those updates in a collection...but (as Rich observed) see only 20 of them, in descending order. Harrumph: As Designed.
https://atappstore.my.workfront.com/attask/api/proj/search?ID=52a51c5900016f91f45550c3c33100fe&fields=updates:message

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

 

Hi @Richard_Le_,

 

I don't believe I've observed (or perhaps "noticed"...?) such a limitation on collections, but am curious, so will do some experiments and let you know if I figure anything out.

 

In the meantime, as a workaround, may I suggest you try hitting either the Notes or Journal Entry objects directly (for each projectID of interest), in case that then retrieves a Full Deck?

 

Regards,

Doug

Avatar

Correct answer by
Community Advisor

 

Harrumph.

 

No dice @Richard_Le_,

 

As below (for future archeologists to study), I took 9 whacks at it and at last do indeed see what you reported, but after checking my usual API nook and cranny resources, grudgingly conclude (as you did) that the limit of 20 is As Designed. I also noted that the 20 that do come back appear to be in the same most-recent-first order as we've come to expect on the Updates tab under a project, which might further imply that This Is Just How It Works (even under api-unsupported, btw).

 

So! In addition to the NOTES workaround I suggested (which does seem viable), my  other suggestion would be to use my Targeted Auditing technique to automatically capture such updates in a fit-for-purpose project level custom parameter, an perhaps add a dash of something similar to The Scoop to help display "aging" comments in a more visually obvious fashion (i.e. recent Red > aging Purple > old Blue).

 

With that, I'll file this one on my Watch list, in case someone does know of a secret syntax that's eluding us...

 

Regards,

Doug

 

 

// trying to pull more than 20 Notes as part of a proj request for Rich L

// step 1: find a project with lots of notes
https://atappstore.my.workfront.com/attask/api/note/report?fields=project:name&project:name_1_GroupBy=true&entryDate_AggFunc=max&&entryDate_AggFunc=min&entryDate_AggFunc=count

// step 2: look up the notes directly for that project ID
https://atappstore.my.workfront.com/attask/api/note/search?projectID=52a51c5900016f91f45550c3c33100fe&fields=projectID,taskID,noteText,auditText,noteObjCode

// step 3: ask for the notes as part of the proj call...RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api/proj/search?ID=52a51c5900016f91f45550c3c33100fe&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 4: count projects with non-null notes:noteText
https://atappstore.my.workfront.com/attask/api/proj/count?notes:noteText_Mod=notnull&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 5:  search projects with non-null notes:noteText STILL RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api/proj/search?notes:noteText_Mod=notnull&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 6: try api-internal STILL RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api-internal/proj/search?notes:noteText_Mod=notnull&fields=notes:auditText,notes:noteText,tasks:notes:auditText,tasks:notes:noteText

// step 7: having typed in 22 updates (notes) by hand at the project level for a particular project, search for them against the NOTES object directly (using the 2024-04-05 prefix on each such note 01, 02, ... 22) WORKS
https://atappstore.my.workfront.com/attask/api/note/search?noteText=2024-04-05&noteText_Mod=cicontains&fields=projectID,noteText

// step 8: attempt to bring those NOTES back via the proj search STILL RETURNS NULL ON ALL NOTES
https://atappstore.my.workfront.com/attask/api/proj/search?ID=52a51c5900016f91f45550c3c33100fe&fields=notes:noteText

// step 9: switched to UPDATES:MESSAGE instead of NOTES:NOTETEXT and at last retrieved those updates in a collection...but (as Rich observed) see only 20 of them, in descending order. Harrumph: As Designed.
https://atappstore.my.workfront.com/attask/api/proj/search?ID=52a51c5900016f91f45550c3c33100fe&fields=updates:message

 

 

Avatar

Community Advisor

Hey Doug,

 

Thanks for the comprehensive response and all your efforts looking into this my friend. Greatly appreciated.

 

I was hoping to avoid calling the Notes object directly, since this will return multiple bundles and will require some creative filtering. C'est la via. Should still be able to make it work however and seems like the best option.

 

Thanks again.

Rich