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

"Acknowledge all cards" not working for "Confirmation" user card example if user is both publisher and recipent of the card #5728

Closed
quinarygio opened this issue Jan 12, 2024 · 0 comments · Fixed by #5746
Assignees
Labels
Bug Something isn't working

Comments

@quinarygio
Copy link
Contributor

quinarygio commented Jan 12, 2024

The issue is due to the fact that selecting "Acnowledge all cards" it is called the method AcknowledgeService.isAcknowledgmentAllowed(..) that is different from the local method isAcknowledgmentAllowed() used in card-ack component to show the acknowledge button (modificato)
11:40
AcknowledgeService.isAcknowledgmentAllowed(user: UserWithPerimeters, card: Card | LightCard, processDefinition: Process): boolean {
if (!processDefinition) return true;
const state = processDefinition.states.get(card.state);
if (state) {
if (state.acknowledgmentAllowed === AcknowledgmentAllowedEnum.NEVER) return false;
if (state.acknowledgmentAllowed === AcknowledgmentAllowedEnum.ALWAYS) return true;
return !UserPermissionsService.isUserEnabledToRespond(user, card, processDefinition);
}
return true;
} (modificato)
11:40
private isAcknowledgmentAllowed(): boolean {
if (!this.cardState.acknowledgmentAllowed) return true;
return (
this.cardState.acknowledgmentAllowed === AcknowledgmentAllowedEnum.ALWAYS ||
(this.cardState.acknowledgmentAllowed === AcknowledgmentAllowedEnum.ONLY_WHEN_RESPONSE_DISABLED_FOR_USER &&
(this.isReadOnlyUser || !this.isUserEnabledToRespond || (this.isUserEnabledToRespond && this.lttdExpiredIsTrue)))
);
}

@quinarygio quinarygio added the Bug Something isn't working label Jan 12, 2024
@quinarygio quinarygio self-assigned this Jan 12, 2024
@vlo-rte vlo-rte linked a pull request Jan 18, 2024 that will 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant