Skip to content

Conversation

@DavidWiseman
Copy link
Collaborator

Copilot AI review requested due to automatic review settings November 9, 2025 17:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables tagging functionality for individual Azure databases, allowing database-level tags in addition to the existing server-level tags. Previously, Azure DB tagging was limited to server-level only, while other instances could have instance-specific tags.

Key Changes:

  • Added IsInherited property to distinguish between inherited server-level tags and database-specific tags for Azure databases
  • Modified the UI to display inherited tags in italic font and prevent editing of inherited tags
  • Updated stored procedures to handle tags for both Azure server instances and individual Azure databases

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
DBADashGUI/Tagging/Tags.resx Removed duplicate metadata entry and added new column metadata for inherited tags
DBADashGUI/Tagging/Tags.cs Added visibility control for inherited column, visual styling for inherited tags, and validation to prevent editing inherited tags
DBADashGUI/Tagging/InstanceTag.cs Added IsInherited property and updated methods to handle NULL InstanceID for server-level tags
DBADashGUI/Main.cs Reset AzureNode to null when changing tag groups
DBADashDB/dbo/Stored Procedures/InstanceTags_Get.sql Modified to return IsInherited flag based on whether tag is instance-specific or server-level
DBADashDB/dbo/Stored Procedures/InstanceTags_Add.sql Updated logic to differentiate between Azure server-level tags and database-level tags
DBADashDB/dbo/Functions/TagValue.sql Changed UNION ALL to UNION to remove duplicate tags for Azure databases
Files not reviewed (1)
  • DBADashGUI/Tagging/Tags.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

T.TagValue,
1 AS Checked
CAST(1 AS BIT) AS Checked,
CASE WHEN @InstanceID IS NULL THEN 0 ELSE 1 END AS IsInherited
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic for IsInherited is reversed. When @InstanceID IS NULL, tags are server-level (not database-specific), so they should be inherited (1) when viewed from a database context. When @InstanceID is provided, these are database-specific tags and should not be inherited (0). This should be CASE WHEN @InstanceID IS NULL THEN 1 ELSE 0 END.

Suggested change
CASE WHEN @InstanceID IS NULL THEN 0 ELSE 1 END AS IsInherited
CASE WHEN @InstanceID IS NULL THEN 1 ELSE 0 END AS IsInherited

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are getting tags for server level, @InstanceID is NULL. The tag is not inherited at this level, but it will be inherited at the Azure DB level (When we pass in a value for @InstanceID). This is used to allow editing at the server level and to prevent a user from unchecking an inherited tag.

@DavidWiseman DavidWiseman merged commit ee44f4d into trimble-oss:main Nov 10, 2025
@DavidWiseman DavidWiseman deleted the 1624_AzureDBTags branch November 10, 2025 09:23
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

Successfully merging this pull request may close these issues.

1 participant