-
Notifications
You must be signed in to change notification settings - Fork 336
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
feat(ado): Sprint Poker Estimates #6481
Conversation
…sIssue to schema and corresponding artifacts
…abolInc/parabol into feature/6125/ado-integration
…abolInc/parabol into feature/6125/ado-integration
…abolInc/parabol into feature/6125/ado-integration
…ed in tsconfig for linting
…abolInc/parabol into feature/6125/ado-integration
…abolInc/parabol into feature/6125/ado-integration Pulling commits from the feature/6125/ado-integration branch
…abolInc/parabol into feature/6125/ado-integration
…abolInc/parabol into feature/6125/ado-integration
Looks like some merge conflicts were introduced after the query PR was accepted/merged. I am resolving now. |
Merge conflicts should be resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few issues I've noticed while playing around with the integrations. Feel free to create new issues for the first two:
-
When I returned to the meeting, I couldn't see any issues. My server logs told me that I needed to refresh the token. How can we fix this so that users won't need to refresh their tokens so frequently?
-
If I click on the hyperlink in the Estimate task card (First pass of user onboarding journey #2 in screenshot below), it doesn't take me to the Azure Devops project:
-
After pulling the latest changes after you fixed the merge conflicts, I get a server error when pushing a score to any Azure Estimate item.
16:19:26 1|GraphQL Executor | Trace: {
16:19:26 1|GraphQL Executor | error: '{"data":null,"errors":[{"message":"column \\"azureDevOpsFieldName\\" of relation \\"TaskEstimate\\" does not exist","locations":[{"line":4,"column":3}],"path":["setTaskEstimate"]}]}'
16:19:26 1|GraphQL Executor | }
16:19:26 1|GraphQL Executor | at executeGraphQL (/Users/nickoferrall/Parabol/dev/gqlExecutor.js:524:13)
16:19:26 1|GraphQL Executor | at processTicksAndRejections (node:internal/process/task_queues:96:5)
16:19:26 1|GraphQL Executor | at async onMessage (/Users/nickoferrall/Parabol/dev/gqlExecutor.js:98113:22)
16:19:26 2|Socket Server | SEND TO SENTRY [Error: column "azureDevOpsFieldName" of relation "TaskEstimate" does not exist] undefined
- This is unrelated to this PR, but in the Scope Search we have a placeholder
Search issues on Azure DevOps
. I just wanted to check whether everything would be referred to as an issue in Azure? I know we return issues but also tasks, epics, and user stories.
Hey @nickoferrall - For item #3 (the azureDevOpsFieldName of relation 'TaskEstimate'), this is happening because @wdfox fixed a spelling type to the database column. @wdfox can confirm here, but I believe you will need to re-setup your local database container to run the migration. I planned on creating separate issues for the first 2. For item #2, there is a hypermedia field in the Azure DevOps api that returns the html url. I was planning on expanding the graph schema and capturing the html url on the work item so it could be displayed as that link. The standard url, that is showing, is the hypermedia url mean for consumption by REST clients. For the authentication/refresh token.....AAD / AzureDevOps has an expiration on the refresh token where JIRA doesn't. At some point (which can be controlled by policy up to a certain amount), the refresh token is going to expire and the user will be forced to re-authenticate. |
@nickoferrall - for you comment on #4 (Search issues on Azure DevOps). An issue in Azure DevOps is a work item type. In GitHub, the base type is Issue and labels are applied (bug, enancement). In Azure DevOps, the was type is work item and there are actual inherited types from that (User Story, Issue, bug) and those inherited types are different depending on the project type. So, there are "Issues" but it would make more sense from an Azure DevOps perspective to say "Work Items". I kept issues there because I was thinking in terms of how Parabol sees the base type. I wasn't sure if parabol users consider everything an Issue and when you import from an external system, that issue is really a pointer to the type in the external system. It is an easy change that I would be happy to make if you think it should say "Work Items" in the case of Azure Dev Ops. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! For the problem where we can't select the "effort" label for Epics, is this the issue that will resolve that: #6512 ?
And I just wanted to check if you've created issues for the first and second points mentioned above?
Thanks for the detail on the fourth point. We want our integrations to feel similar to the app that they're used to using. If "Work Items" is what they're called in Azure, it'd be great to refer to them as "Work Items" in Parabol's app too.
packages/server/postgres/migrations/1650768593875_add-AzureDevOpsDimensionFieldMap.ts
Outdated
Show resolved
Hide resolved
Ready for a review from @Dschoordsch now |
Bob is spot on about issue #3, though you can also resolve this directly by pulling up PGAdmin and directly fixing the spelling of the column named 'azureDevOpsFieldName' in the TaskEstimate table |
@nickoferrall - do you need anything from me to advance to the next stage, or will @Dschoordsch be notified automatically? |
Nope, nothing you need to do. Georg has already been notified 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/client/components/AzureDevOpsScopingSelectAllIssues.tsx
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,10 @@ | |||
const AzureDevOpsDimensionFieldId = { | |||
join: (instanceId: string, dimensionName: string, fieldId: string) => | |||
`${instanceId}:${dimensionName.replace(/\s/g, '¶')}:${fieldId}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 I would be more interested why we need to replace whitespace
packages/server/postgres/migrations/1650768593875_add-AzureDevOpsDimensionFieldMap.ts
Outdated
Show resolved
Hide resolved
packages/server/postgres/queries/getAzureDevOpsDimensionFieldMaps.ts
Outdated
Show resolved
Hide resolved
@@ -233,6 +256,24 @@ class AzureDevOpsServerManager { | |||
return json | |||
} | |||
|
|||
private readonly patch = async <T>(url: string, payload: any) => { | |||
const patchHeaders = this.headers | |||
patchHeaders['Content-Type'] = 'application/json-patch+json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 Since you're only assigning a reference in line 260 this will modify this.headers
which is most likely not what you want. Instead it would be easier if you would modify the next lines
const res = await this.fetchWithTimeout(url, {
...
headers: {
...this.headers,
['Content-Type']: 'application/json-patch+json'
}
...
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wdfox - I agree with @Dschoordsch. I just wanted to confirm, you weren't looking to permanently modify the Content Type of any future calls to Azure DevOps. You only wanted the json-path when calling patch, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the change. I just want confirmation from @wdfox that this was the intent. I will mark resolved when confirmed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is correct @bobjac. This patch endpoints requires the Content-Type to be application/json-patch+json
. I made a quick fix the easiest way I could think, but your modification should be perfectly fine.
Great. I'll take a look this afternoon. |
@Dschoordsch - the two issues you pointed out in the top comment have separate issues for them already.
|
There was no issue to resolve in the above comment referenced at #6481 (comment), but this was copied from the previous atlassian implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dschoordsch - that last issue was also related to the project/work item relationship. I have an issue open for that. I will create a branch and fix that since this has been merged. |
This pull request includes functionality for importing Azure DevOps work items into a sprint poker meeting and pushing estimates back to Azure Dev Ops. It includes:
![Screen Shot 2022-04-28 at 1 48 37 PM](https://user-images.githubusercontent.com/1582053/165815719-effb2b85-19e3-4163-a85c-c05c409
a552b.png)