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

List of Projects available to select is truncated at 200 #19

Open
ghost opened this issue Jul 7, 2020 · 1 comment
Open

List of Projects available to select is truncated at 200 #19

ghost opened this issue Jul 7, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 7, 2020

When setting up the plugin and clicking -> Select Project for Repository, there is no pagination or other function to view more than the 200 projects at a time.

I am using this as a site as an Administrator, so I have access to all projects in the Owner company - even those which I am not assigned to. Unfortunately this pushes many of the ones which are relevant to me beyond the first 200 in alphabetical order.

image

@TheDavidJohnson
Copy link
Contributor

Ran into this same issue today. The limit is coming from this API call:

            const url = this.root + '/tasks/projects.json?type=canAddItem&pageSize=200';

Some sort of pagination is probably the ideal solution, but I successfully tested a temporary workaround by locating the js source for the installed extension on my system and changing that query to pageSize=4000

YMMV.

I'm using the vscodium project and installed this extension from a downloaded .vsix file, so the path to the relevant file on my system was ~/.vscode-oss/extensions/teamwork.twp-1.0.21/out/teamworkProjectsApi.js and the query was on line 81.

I had to close and reopen VS Code for it to take effect, but I was able to see all my projects and the query execution was surprisingly fast.

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