Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
JesperSchulz authored Sep 18, 2024
1 parent 4a85163 commit 68d8a2e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ codeunit 324 "No. Series Copilot Impl."

var
IncorrectCompletionErr: Label 'Incorrect completion. The property %1 is empty', Comment = '%1 = property name';
EmptyCompletionErr: Label 'Incorrect completion. The completion is empty';
EmptyCompletionErr: Label 'Incorrect completion. The completion is empty.';
IncorrectCompletionNumberOfGeneratedNoSeriesErr: Label 'Incorrect completion. The number of generated number series is incorrect. Expected %1, but got %2', Comment = '%1 = Expected Number, %2 = Actual Number';
TextLengthIsOverMaxLimitErr: Label 'The property %1 exceeds the maximum length of %2', Comment = '%1 = property name, %2 = maximum length';
DateSpecificPlaceholderLbl: Label '{current_date}', Locked = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ table 392 "No. Series Generation Detail"
{
Caption = 'Message';
}

field(20; "Setup Table Name"; Text[80])
{
Caption = 'Setup Table';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ codeunit 331 "No. Series Cop. Add Intent" implements "AOAI Function"

local procedure SaveExistingNoSeries(TempTableMetadata: Record "Table Metadata" temporary; FieldRef: FieldRef)
var
ExistingNoSeriesJObj: JsonObject;
NoSeries: Record "No. Series";
NoSeriesLine: Record "No. Series Line";
NoSeriesManagement: Codeunit "No. Series";
ExistingNoSeriesJObj: JsonObject;
begin
if not NoSeries.Get(Format(FieldRef.Value)) then
exit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ codeunit 336 "No. Series Cop. Tools Impl."
foreach Entity in Entities do begin
String1 := RecordMatchMgtCopy.RemoveShortWords(RemoveTextPart(TableMetadata.Caption, ' Setup') + ' ' + RemoveTextParts(Field.FieldName, GetNoSeriesAbbreviations()));
String2 := RecordMatchMgtCopy.RemoveShortWords(Entity);
Score := RecordMatchMgtCopy.CalculateStringNearness(String1, String2, GetMatchLengthTreshold(), 100) / 100;
Score := RecordMatchMgtCopy.CalculateStringNearness(String1, String2, GetMatchLengthThreshold(), 100) / 100;
if Score >= RequiredNearness() then
exit(true);
end;
exit(false);
end;

local procedure GetMatchLengthTreshold(): Decimal
local procedure GetMatchLengthThreshold(): Decimal
begin
exit(2);
end;
Expand Down

0 comments on commit 68d8a2e

Please sign in to comment.