-
Notifications
You must be signed in to change notification settings - Fork 169
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
#1978 HasDatabaseUpgradeTag #2061
base: main
Are you sure you want to change the base?
Conversation
src/System Application/App/Upgrade Tags/src/UpgradeTag.Codeunit.al
Outdated
Show resolved
Hide resolved
Co-authored-by: Natalie Karolak, MVP <[email protected]>
/// </summary> | ||
/// <param name="Tag">Tag code to check</param> | ||
/// <returns>True if the Tag with the given code exists.</returns> | ||
procedure HasDatabaseUpgradeTag(Tag: Code[250]): Boolean |
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.
So the idea was to use SetUpgradeTag and HasUpgradeTag only, the code will find out from the context if the tag is per database or per company. Approving since we already have the SetDatabaseUpgradeTag, which is wrongly named IMO. It should be PerDatabaseUpgradeTag
@@ -43,6 +43,16 @@ codeunit 9999 "Upgrade Tag" | |||
exit(UpgradeTagImpl.HasUpgradeTag(Tag, TagCompanyName)); | |||
end; | |||
|
|||
/// <summary> | |||
/// Verifies if the database upgrade tag exists. |
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.
per-databse
/// <summary> | ||
/// Verifies if the database upgrade tag exists. | ||
/// </summary> | ||
/// <param name="Tag">Tag code to check</param> |
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.
Could you add a comment that the developer can use HasUpgradeTag if it is called from the upgrade context? If it is called from upgrade context e.g. OnUpgradePerDatabase we will automatically use perdatabase check and similar for percompany?
Nothing wrong with using this one directly but it could be confusing if someone is reading the existing code.
@TKapitan, should we try to reel this one in? Not much pending, the way I see it. Nikola even approved. |
Summary
Adds HasDatabaseUpgradeTag() procedure to make the setters and getters the same.
Work Item(s)
Fixes #1978
Fixes AB#550241