Skip to content

Fixed message queue clearance logic in ec.message.clearAll() method#631

Merged
acetousk merged 1 commit intomoqui:masterfrom
dixitdeepak:message-facade-clear-all
Dec 8, 2025
Merged

Fixed message queue clearance logic in ec.message.clearAll() method#631
acetousk merged 1 commit intomoqui:masterfrom
dixitdeepak:message-facade-clear-all

Conversation

@dixitdeepak
Copy link
Contributor

The ec.message.clearAll() method is intended to clear all messages from the queue, but due to the current implementation, it fails to do so.

The method operates by first clearing the message list and then calling the clearErrors() method.
The clearErrors() method is designed to clear error messages from the queue, but as part of its operation, it inadvertently adds an error message back into the messageList.

This behavior results in the clearAll method being unable to fully clear the message queue, as error messages get reintroduced after the attempt to clear them.

@dixitdeepak
Copy link
Contributor Author

Alternatively we can clear the errorList and validationErrorList list in clearAll(),
and set the hasErrors = false.

@acetousk acetousk merged commit 6136030 into moqui:master Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants