Skip to content

Commit

Permalink
Address code review comments on ResolveTimeToken (#511)
Browse files Browse the repository at this point in the history
The case should not get changed in the event, as that might be breaking.

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#483241](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/483241)
  • Loading branch information
JesperSchulz authored Jan 24, 2024
1 parent 3e80ef4 commit a33a6b4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ codeunit 58 "Filter Tokens Impl."

local procedure ResolveTimeToken(var TimeFilter: Time; TimeToken: Text) Handled: Boolean
begin
TimeToken := DelChr(TimeToken); // Deletes all spaces in TimeToke
TimeToken := UpperCase(TimeToken); // Turn TimeToken into uppercase
case TimeToken of
TimeToken := DelChr(TimeToken); // Deletes all spaces in TimeToken

case UpperCase(TimeToken) of
NowTxt, 'NOW':
begin
TimeFilter := Time();
Expand All @@ -397,6 +397,7 @@ codeunit 58 "Filter Tokens Impl."
else
FilterTokens.OnResolveTimeFilterToken(TimeToken, TimeFilter, Handled);
end;

if not Handled then
Handled := Evaluate(TimeFilter, TimeToken);
end;
Expand Down

0 comments on commit a33a6b4

Please sign in to comment.