Skip to content
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

LC0035 - False Positive FlowField #694

Open
pri-kise opened this issue Jul 11, 2024 · 6 comments · Fixed by #698
Open

LC0035 - False Positive FlowField #694

pri-kise opened this issue Jul 11, 2024 · 6 comments · Fixed by #698
Labels
bug Something isn't working Resolved

Comments

@pri-kise
Copy link

I don't know why, but I receive the info for LC0035 for this field below although this field is added on two pages.

tableextension 50000 "PTE-XXX Time Sheet Header" extends "Time Sheet Header"
{
    fields
    {
        field(50000; "PTE-XXX Resource Unit Cost"; Decimal)
        {
            CalcFormula = lookup(Resource."Unit Cost" where("No." = field("Resource No.")));
            Caption = 'Resource Unit Cost';
            Editable = false;
            FieldClass = FlowField;
        }
    }
}
@Arthurvdv Arthurvdv added the bug Something isn't working label Jul 11, 2024
@pri-kise
Copy link
Author

It's added on my own pages. Not on a pageextension..

@Arthurvdv
Copy link
Collaborator

I think this is related to #669, where the rule has been improved to also be raised on additional scenario's.

@Arthurvdv Arthurvdv added documentation Improvements or additions to documentation and removed bug Something isn't working labels Jul 11, 2024
@ans-bar-bm
Copy link
Contributor

I don't think it is directly related to #669, although the extended rule may have surfaced this problem.

The issue is that currently there is a separation in the analysis logic, so that for fields on tableextensions only fields on pageextensions are considered. As @pri-kise clarified the fields exist on a standalone page, not a pageextension, so they are not "seen" by this rule.
I think likewise the "reverse" case also does not work correctly, that is if you have a standalone table and related page, and you have a field in this table that does not exist directly on this page. If you now extend that page yourself (which can be done since the latest releases) with this one field, that pageextension field is also not "seen".

I've linked a PR to fix this issue, in the bit of testing i did it seems to work with those changes.

@Arthurvdv Arthurvdv added bug Something isn't working Resolved and removed documentation Improvements or additions to documentation labels Jul 12, 2024
@Arthurvdv
Copy link
Collaborator

@ans-bar-bm, Thank you for looking into this and providing the PR for this 🙌

@pri-kise, I've merged this into the pre-release, where it should be resolved.

@pri-kise
Copy link
Author

It's fixed and lgtm.

@Arthurvdv
Copy link
Collaborator

The version v0.30.28 of the LinterCop is now the latest release. Could you verify if this is now working as expected? If this is the case, you may close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Resolved
Projects
None yet
3 participants