You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/09/16 09:30:00 UTC
[jira] [Commented] (OFBIZ-13587) checkInvoiceStatusInProgress loses its specific error messages
[ https://issues.apache.org/jira/browse/OFBIZ-13587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18115935#comment-18115935 ]
ASF subversion and git services commented on OFBIZ-13587:
---------------------------------------------------------
Commit c7503e0c62cb92012c64152f91b9121de3624087 in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=c7503e0c62 ]
Fixed: checkInvoiceStatusInProgress loses its specific error messages (OFBIZ-13587)
The method was converted into a permission-service (used by createInvoiceItem/updateInvoiceItem/removeInvoiceItem/createInvoiceRole/removeInvoiceRole/createInvoiceTerm) that only returned hasPermission, never a failMessage. The original minilang raised distinct labeled errors distinguishing "invoice not found" from "can only update while in process." Without a failMessage, the permission framework substituted a generic "you do not have permission" message, losing the specific reason for the rejection. The method now sets the appropriate AccountingInvoiceNotFound or AccountingInvoiceUpdateOnlyWithInProcessStatus label in each failure branch.
> checkInvoiceStatusInProgress loses its specific error messages
> --------------------------------------------------------------
>
> Key: OFBIZ-13587
> URL: https://issues.apache.org/jira/browse/OFBIZ-13587
> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Minor
>
> {{checkInvoiceStatusInProgress}} was converted into a {{<permission-service>}} (used by {{createInvoiceItem}}/{{updateInvoiceItem}}/{{removeInvoiceItem}}/{{createInvoiceRole}}/{{removeInvoiceRole}}/{{createInvoiceTerm}}) that only returns {{hasPermission}}, never a {{failMessage}}. The original minilang raised distinct labeled errors ("Invoice not found" vs. "can only update while in process"). Since {{failMessage}} is absent, the permission framework substitutes a generic "you do not have permission" message, losing the specific reason for the rejection.
> Needs fixing: set {{result.failMessage}} to the appropriate specific label ({{AccountingInvoiceNotFound}} / {{AccountingInvoiceUpdateOnlyWithInProcessStatus}}) in the failure branches.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)