-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for child items #22
Comments
hi @mendykrauss, CP does not have 100% coverage of all the CW apis. It has broad coverage of many of the more commonly used modules of CW like service tickets and companies plus many others. for example CP wraps about 37 api's of CW yet CW api count is closer to 200 ish. wish I had better news. |
Hey @mendykrauss, I know that was a lame answer. I took a deeper look this morning at how to accomplish this in the short term without an official CP api wrapper. For just getting that info, it's not too difficult by subclassing CWcontroller. I'm sure this can be accomplished in a cleaner way but its not terrible. There is a-lot of meta programming the in the base objects and I haven't quite got my heard around it all. It helps that several of the board child items already have an object type created in CP. This includes boards/types, boards/sub_types, boards/items, boards/team, boards/status, etc. However some are missing. I added logic to serialize the data when possible and if not just return the json response direct from CW. In the latter case, it's up to the user to get what they need from the json. Here is an example class that will return serialized board child elements for items that have a object definition or just json for ones that don't. Note: it only provides support for the "get" function. Other actions would have to be built out.
|
Thank you! For now I was only looking for get... |
I solved this for Purchase Order Line Items with this module, but that was a one-off. An example is here. I think @emichaud's solution is probably more scalable than mine. Either way, somebody's got to write the code. |
I'm wondering how to get child item info.
i.e. /service/boards/{id}/statuses
(Same with board types, subtypes, etc.)
The text was updated successfully, but these errors were encountered: