-
Notifications
You must be signed in to change notification settings - Fork 62
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
[Integration][ADO] Bug Fix: Default mapping errors #989
[Integration][ADO] Bug Fix: Default mapping errors #989
Conversation
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.
left some comments
resources: | ||
- kind: project | ||
selector: | ||
query: 'true' | ||
defaultTeam: "true" | ||
defaultTeam: true |
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.
shouldn't this be 'true'?
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.
Done
def _add_project_id_to_work_items( | ||
self, work_items: list[dict[str, Any]], project_id: str | ||
) -> None: | ||
self, work_items: list[dict[str, Any]], project_id: str, project: dict[str, Any] | ||
) -> list[dict[str, Any]]: |
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.
rename the function to __add_project_details_to_work_items(self, work_item, project)
then you can do
__projectId = project["id]
__project = project
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.
Done
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
integrations/azure-devops/azure_devops/client/azure_devops_client.py
Outdated
Show resolved
Hide resolved
relations: | ||
project: '.fields."System.TeamProject" | gsub(" "; "")' | ||
project: .__projectId |
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.
This should be also updated to be without special characters?
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.
good catch
Description
What -
This PR addresses a few bugs and improvements in the Azure DevOps (ADO) integration related to the default mappings for service and work-item entities, handling of project data, and logging enhancements.
Why -
System.TeamProject
, which referenced the project name instead of the internal project identifierHow -
__projectId
, extracting the correct internal project identifier, ensuring accurate associations in Port.Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
Include screenshots from your environment showing how the resources of the integration will look.
API Documentation
Provide links to the API documentation used for this integration.