ApplaudSolutions / Applaud-Workato-Connector

Code pertaining to the Applaud Workato Connector
0 stars 0 forks source link

Search instances action #15

Closed duncancasemore closed 3 years ago

duncancasemore commented 4 years ago

Summary

  1. As a Integration Designer
  2. I want to build recipes that search data in Applaud
  3. so that I can use the results and perform follow-up actions in Applaud or other applications

Acceptance Criteria

  1. I can select the Search instances action
  2. I can select the model. This has the same behavior as #11
  3. When I select the model, I see this shows in lower case PLURAL in the action title above and in the recipe viewer
  4. When I select the model, I then see all the model property fields as optional and collapsed by default
  5. I see the fields in the order specified by the Applaud property order (not alphabetical)
  6. I see the Id field, which is the first one shown
  7. I see that I can specify the max results. Where not specified, this defaults to 10
  8. I cannot specify a maximum that is greater than 200
  9. If the Applaud API returns a paginated set of results that I do not neglect subsequent pages up to the maximum results. For example, if the Applaud API page is 10 and my maximum is 50, I will need to iterate over 5 pages of results (probably easier to set the maximum as the API page size if possible)
  10. I can specify the sort properties together with ascending or descending
  11. I can specify multiple sort properties. These are all sorted by either ascending or all sorted by either descending (I cannot have 1 ascending and another descending)
  12. I can select free-text properties in the sort list and these work as expected
  13. I can select number properties in the sort list and these work as expected
  14. I can select boolean properties in the sort list and these work as expected
  15. I can select date properties in the sort list and these work as expected
  16. I can select date/time properties in the sort list and these work as expected
  17. I can select file properties in the sort list and these work as expected (sorted by file id)
  18. I can select user properties in the sort list and these work as expected (sorted by user id)
  19. I can select email properties in the sort list and these work as expected
  20. I can select URL properties in the sort list and these work as expected
  21. I can select lookup properties in the sort list and these work as expected (sorted by lookup id)
  22. I can select foreign key properties in the sort list and these work as expected (sorted by foreign key id)
  23. I can select icon properties in the sort list and these work as expected
  24. I can select color properties in the sort list and these work as expected
  25. I cannot select date range or geopoint properties in the sort list
  26. I see that when this action fires it searches the data in Applaud (GET) by using the given criteria
  27. I do not have to enter any search criteria; this simply retrieves all instances up to the max results
  28. I see that the search results are available as a list datapill in later actions, with detail pills for each property of the item
  29. I see that I can use the search results count as a datapill

Wireframes and mockups

Search action

Applaud action search.png

Notes

None

Developer Testing

Requestor: leave this section blank Developer: complete this section during commit/pull request

Positive testing:

Add all the things that you have checked whilst completing this story here, it should be written in a non-technical way, and a lot of this can probably be taken from the acceptance criteria, here are two different examples:

Negative testing:

Here you list the things you have checked where your code needs to show an error, handle unusual/bad input/config gracefully, or may impact separate features that use or depend on the same code. Pause and think -- they may not be obvious! Examples:

e2e test links and description:

Ritesh717 commented 3 years ago

image

Notes

If the Applaud API returns a paginated set of results that I do not neglect subsequent pages up to the maximum results. For example, if the Applaud API page is 10 and my maximum is 50, I will need to iterate over 5 pages of results (probably easier to set the maximum as the API page size if possible)

There is no pagination in Applaud API if we are setting the limit on the number of records fetched(10 is default per AC 7).

Search instance action is configured in Applaud Connector2

Ritesh717 commented 3 years ago

As a part of the Search action as per AC 25, other than date-time range fields and geo point fields, all other fields can be used for search and sort instances. Now that lookups are configured, search action should also fetch records filtered/sorted by lookup values. But in the lookup if
allow multiple is set to true, search action is not fetching results(getting error response from cloud). image https://dev-workato-com.applaudhcm.com/api/custom/tests?filter[where][statusId]=6006a82c589667801c2d6e79&filter[where][employeeTypeIds][inq]=6007d80f01a9448a0c26171e&filter[where][employeeTypeIds][inq]=6007d80f01a9448a0c26171f On trying the same using filter {"getFrom":"mongo"} Cloud is returning the results. So there are 2 Options

  1. Raise a git in the cloud board to fetch results for the lookup fields having multiple values.
  2. Disable lookup fields in search and sort actions in workato. @duncancasemore can you please review.
duncancasemore commented 3 years ago

@GangamRitesh can we include lookup properties on search when allow multiple is unticked but hide it when it's ticked?

Ritesh717 commented 3 years ago

Yes @duncancasemore It is possible

ssarap commented 3 years ago

@GangamRitesh Do we have tracking git for lookups filter not working when multiple values are allowed?