chore(scm-messaging-integration-ui): Serializing MS teams installation type - #121964
Open
Abdkhan14 wants to merge 1 commit into
Open
chore(scm-messaging-integration-ui): Serializing MS teams installation type#121964Abdkhan14 wants to merge 1 commit into
Abdkhan14 wants to merge 1 commit into
Conversation
Abdkhan14
marked this pull request as ready for review
August 13, 2026 17:54
jaydgoss
approved these changes
Aug 14, 2026
|
|
||
| @control_silo_test | ||
| class MsTeamsIntegrationConfigTest(TestCase): | ||
| def setUp(self) -> None: |
Member
There was a problem hiding this comment.
nit: the other test classes in this file call super().setUp() here. It works without it because the fixtures are lazy, but worth keeping consistent.
| ) | ||
| self.installation = MsTeamsIntegration(self.integration, self.organization.id) | ||
|
|
||
| def test_config_data_team(self) -> None: |
Member
There was a problem hiding this comment.
nit: this and test_config_data_tenant only differ by the string. Could fold them into one test with both asserts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed by: #121631
Background
MS Teams installations come in two flavours:
"team"(a single team) and"tenant"(an org-wide tenant install). Only team installs support Issue Alerts, so the frontend'sisEligibleForIssueAlertscheck gates tenant installs out of the inline destination picker. The problem is thatinstallation_typelives inIntegration.metadatabut never reaches the API —MsTeamsIntegrationinherits the defaultget_config_data(), which returnsOrganizationIntegration.configand nothing else. The frontend always receivesconfigData: undefined, making the eligibility check permanently dead code.Change
Override
get_config_data()onMsTeamsIntegrationto pluckinstallation_typefromself.model.metadataand expose it asinstallationTypeinconfigData, defaulting to""for legacy installs that predate the field ("" !== "tenant"so they remain eligible). This mirrors the pattern Slack already uses for its owninstallationType. No schema or DB changes — the value already exists in metadata, we are only serializing it. Three unit tests cover theteam,tenant, and missing cases.