This is an automated email from the ASF dual-hosted git repository.

mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0d4c438067 Fixed: getLastSystemInfoNote off-by-one on note 2 and note 
3 thresholds (OFBIZ-13586)
0d4c438067 is described below

commit 0d4c43806784468defcc43eeaaec0b683fb46b7d
Author: Mridul Pathak <[email protected]>
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 68a28ac6b7..9f4109c638 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]
         }
     }

Reply via email to