Skip to content
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

Add Discovery with custom fields #5

Open
visch opened this issue Aug 29, 2021 · 6 comments
Open

Add Discovery with custom fields #5

visch opened this issue Aug 29, 2021 · 6 comments

Comments

@visch
Copy link
Contributor

visch commented Aug 29, 2021

No description provided.

@visch
Copy link
Contributor Author

visch commented Oct 12, 2021

This has been painful, created some custom fields trying to work through this via the API here's my own notes

ZohoSprints allows for Custom Fields, to get this data via the API a query like this works https://sprintsapi.zoho.com/zsapi/team/758947948/projects/114398000000003959/item/no-3/?action=details

In the itemprop section of this response the custom fields are UDF_CHAR2, and UDF_RELEASE1

    "item_prop": {
        "endDate": 25,
        "description": 1,
        "isNotesAdded": 7,
        "itemNo": 2,
        "ownerId": 32,
        "addedVia": 15,
        "hasCheckList": 17,
        "leftPosition": 5,
        "points": 28,
        "duration": 30,
        "itemName": 0,
        "startAfter": 23,
        "createdTime": 11,
        "isIntegrated": 16,
        "rightPosition": 6,
        "rootItem": 19,
        "isDocsAdded": 9,
        "UDF_CHAR2": 31,
        "projPriorityId": 24,
        "isParent": 8,
        "UDF_RELEASE1": 29,
        "completedDate": 12,
        "sequence": 10,
        "sprintId": 20,
        "depth": 4,
        "epicId": 22,
        "statusId": 27,
        "createdBy": 3,
        "parentItem": 18,
        "projItemTypeId": 21,
        "completedBy": 14,
        "startDate": 26
    },

Querying the itme through the full list of items using
https://sprintsapi.zoho.com/zsapi/team/{{teamId}}/projects/{{projectId}}/sprints/114398000000003987/item/?action=sprintitems&index=1&range=25

Doesn't list the custom fields in the response anywhere.

Scope to use:
ZohoSprints.projects.READ, ZohoSprints.teams.READ, ZohoSprints.items.READ, ZohoSprints.epic.READ, ZohoSprints.sprints.READ

@visch
Copy link
Contributor Author

visch commented Oct 12, 2021

In the hunt for the best way to get custom field values

https://sprintsapi.zoho.com/zsapi/team/{{teamId}}/projects/{{projectId}}/sprints/114398000000003987/item/?action=sprintitems&index=1&range=100

(https://sprints.zoho.com/apidoc.html#Getmultipleitemdetails) doesn't work either. You can pass in any number of ITEM ids, but item props doesn't include custom information

    "item_prop": {
        "endDate": 7,
        "description": 3,
        "isNotesAdded": 10,
        "itemNo": 17,
        "ownerId": 31,
        "addedVia": 5,
        "hasCheckList": 23,
        "leftPosition": 15,
        "points": 18,
        "duration": 20,
        "itemName": 1,
        "startAfter": 22,
        "createdTime": 19,
        "isIntegrated": 12,
        "rightPosition": 16,
        "rootItem": 25,
        "isDocsAdded": 11,
        "projPriorityId": 30,
        "isParent": 13,
        "completedDate": 8,
        "itemId": 0,
        "sequence": 2,
        "sprintId": 26,
        "depth": 14,
        "epicId": 24,
        "statusId": 28,
        "createdBy": 4,
        "parentItem": 27,
        "projItemTypeId": 29,
        "startDate": 6,
        "completedBy": 21
    },

@visch
Copy link
Contributor Author

visch commented Oct 12, 2021

https://sprintsapi.zoho.com/zsapi/team/{{teamId}}/projects/{{projectId}}/?action=itemcfields Pulls the list of custom fields on the project, but still not enough (Documenting all of this as I keep trying in different ways to get this)

@visch
Copy link
Contributor Author

visch commented Oct 24, 2021

Going to generate this for Items at a minimum to add the record object, related to the fix for #15

@visch
Copy link
Contributor Author

visch commented Oct 25, 2021

@visch
Copy link
Contributor Author

visch commented Oct 25, 2021

Going to use https://sdk.meltano.com/en/latest/code_samples.html#dynamically-discovering-schema-for-a-stream

Generate schema from a static list of fields, and add a list of fields from each projects custom field call https://sprintsapi.zoho.com/zsapi/team/{{teamId}}/projects/{{projectId}}/?action=itemcfields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant