Skip to content

Bug - Approval descision - Duplicate of #413 #425

@gitpm

Description

@gitpm

Is this a regression?

Yes

Severity

🟠 Major – significantly affects usability

Please provide the branch(es) you discovered this issue in

v92

Environment Details

Ege

Please provide a minimal set of steps to reproduce the issue

  1. Go to "Pending Requests"
  2. Open a "pending request" in detail
  3. Try to "approve" the pending request
  4. An error occurs (see screenshot)
Image Image

Description

The error is located here:
/imxweb/projects/qer/src/lib/itshopapprove/decision-step.service.ts

Describe what you expected to happen versus what actually happened

I fixed the error like this:

Image

This is the adapted code:
`export function getWorkflowDataWithSmallestSublevel(extended: any, entity: TypedEntity, uidUser: string): EntityData | undefined {
const filteredSteps = extended?.WorkflowData?.Entities?.filter(
(data: EntityData) =>
data?.Columns?.UID_PersonHead.Value === uidUser &&
(data?.Columns?.Decision?.Value ?? '') === '' &&
data.Columns.LevelNumber.Value === entity.GetEntity().GetColumn('DecisionLevel').GetValue()
);

if (!filteredSteps || filteredSteps.length === 0) {
return undefined; // Return undefined if no steps match the criteria
}

return filteredSteps.reduce((lowestSublevel, current) => {
return current.Columns.SubLevelNumber.Value < lowestSublevel.Columns.SubLevelNumber.Value ? current : lowestSublevel;
});
}
`

Relevant logs or console output

Add a screenshot(s) if that helps illustrate the problem

No response

Suggested Fix

No response

Anything else?

No response

Before submitting...

  • My issue is a customization issue that is not covered by product support
  • I have included all necessary details to reproduce this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions