Skip to content

Now the quality inspection card shows the status in bold + green if open#6849

Open
6CRIPT wants to merge 4 commits intomainfrom
bugs/622626-Status-field-must-be-Bold-/-Green-if-open
Open

Now the quality inspection card shows the status in bold + green if open#6849
6CRIPT wants to merge 4 commits intomainfrom
bugs/622626-Status-field-must-be-Bold-/-Green-if-open

Conversation

@6CRIPT
Copy link
Contributor

@6CRIPT 6CRIPT commented Feb 25, 2026

Fixes AB#622626

Now if the Status is "Open" the Quality Inspection Card shows it in bold/green.
image
However, I was wondering if it makes sense also to propagate this change to the Quality Inspection List, like this:
image
The commit only includes the Card part (first image), therefore if you want, I can also push the second part to have the same format in the list.

Also Attila and I were wondering if we want the other status to be bold (but not green), not just default. Like for finished in "Sales Order"

@6CRIPT 6CRIPT requested a review from a team as a code owner February 25, 2026 13:44
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Feb 25, 2026
@6CRIPT 6CRIPT self-assigned this Feb 25, 2026
@github-actions github-actions bot added this to the Version 29.0 milestone Feb 25, 2026
BardurKnudsen
BardurKnudsen previously approved these changes Feb 25, 2026
field(Status; Rec.Status)
{
Editable = false;
StyleExpr = StatusStyleExpr;
Copy link
Contributor

Choose a reason for hiding this comment

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

Fine.

Just FYI: There is also another pattern that can be handy:

                Style = "Favorable";
                StyleExpr = Rec.Status = Rec.Status::Open;

The result is the same, but you don't need to code anything

@AndreiPanko
Copy link
Contributor

@6CRIPT good point regarding Bold for Finished status. Please implement.
Regarding list - could you please check how sales or purchase orders display the Status there? I don't think we have any formatting.

@6CRIPT
Copy link
Contributor Author

6CRIPT commented Feb 27, 2026

For "Sales order":
image
I am going to implement it for "Quality inspection" lists as well.

begin
IsOpen := Rec.Status = Rec.Status::Open;

StatusStyleExpr :=
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest case statement, although it would be pretty much the same. On the other hand, please move this code to procedure in table (or codeunit), since it is used on the list page as well.

CanReopen := RowActionsAreEnabled and not Rec.HasMoreRecentReinspection();
CanFinish := RowActionsAreEnabled and (Rec.Status <> Rec.Status::Finished);
CanCreateReinspection := RowActionsAreEnabled;
StatusStyleExpr :=
Copy link
Contributor

@JakovljevicDusan JakovljevicDusan Mar 4, 2026

Choose a reason for hiding this comment

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

Should be needed only in OnAfterGetCurrRecord. Remove from OnOpenPage and OnAfterGetRecord.
Hm, another question is existing code in OnOpenPage that probably does nothing (as it is reading Rec). But not issue in scope of this PR.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants