You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2026/09/16 07:32:30 UTC
(ofbiz-framework) branch release24.09 updated: Fixed: getLastSystemInfoNote off-by-one on note 2 and note 3 thresholds (OFBIZ-13586)
This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release24.09 by this push:
new 1ad6101f3e Fixed: getLastSystemInfoNote off-by-one on note 2 and note 3 thresholds (OFBIZ-13586)
1ad6101f3e is described below
commit 1ad6101f3eac54831c9052faec68bf702d37ee51
Author: Mridul Pathak <mr...@gmail.com>
AuthorDate: Wed Sep 16 12:50:08 2026 +0530
Fixed: getLastSystemInfoNote off-by-one on note 2 and note 3 thresholds (OFBIZ-13586)
The method showed lastSystemInfoNote2 once exactly 2 notes existed and lastSystemInfoNote3 once 3 or more existed. The original minilang instead checked for the existence of the next index beyond what it displays before showing a slot: note 2 only once a 3rd note also exists, and note 3 only once a 4th note also exists. The size checks now require one more note than the slot being populated, matching that original threshold.
---
.../org/apache/ofbiz/commonext/ofbizsetup/SystemInfoServices.groovy | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/applications/commonext/src/main/groovy/org/apache/ofbiz/commonext/ofbizsetup/SystemInfoServices.groovy b/applications/commonext/src/main/groovy/org/apache/ofbiz/commonext/ofbizsetup/SystemInfoServices.groovy
index 29c386b0c1..98f12dd3a3 100644
--- a/applications/commonext/src/main/groovy/org/apache/ofbiz/commonext/ofbizsetup/SystemInfoServices.groovy
+++ b/applications/commonext/src/main/groovy/org/apache/ofbiz/commonext/ofbizsetup/SystemInfoServices.groovy
@@ -72,10 +72,10 @@ Map getLastSystemInfoNote() {
.queryList()
if (systemInfoNotes) {
result.lastSystemInfoNote1 = systemInfoNotes[0]
- if (systemInfoNotes.size() == 2) {
- result.lastSystemInfoNote2 = systemInfoNotes[1]
- } else if (systemInfoNotes.size() > 2) {
+ if (systemInfoNotes.size() > 2) {
result.lastSystemInfoNote2 = systemInfoNotes[1]
+ }
+ if (systemInfoNotes.size() > 3) {
result.lastSystemInfoNote3 = systemInfoNotes[2]
}
}