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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 725e5957b Fixed: double-negation footgun in 
ProjectServicesScript.groovy timesheet status check (#413)
725e5957b is described below

commit 725e5957beb46d221dd245734f38e3c08922455b
Author: Ashish Vijaywargiya <[email protected]>
AuthorDate: Fri Sep 18 17:56:57 2026 +0530

    Fixed: double-negation footgun in ProjectServicesScript.groovy timesheet 
status check (#413)
    
    Fixing the double negation condition.
---
 .../groovy/org/apache/ofbiz/projectmgr/ProjectServicesScript.groovy     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/projectmgr/src/main/groovy/org/apache/ofbiz/projectmgr/ProjectServicesScript.groovy
 
b/projectmgr/src/main/groovy/org/apache/ofbiz/projectmgr/ProjectServicesScript.groovy
index aae568e54..da535153a 100644
--- 
a/projectmgr/src/main/groovy/org/apache/ofbiz/projectmgr/ProjectServicesScript.groovy
+++ 
b/projectmgr/src/main/groovy/org/apache/ofbiz/projectmgr/ProjectServicesScript.groovy
@@ -699,7 +699,7 @@ Map createTimeEntryInTimesheet() {
     if (parameters.fromDate && !parameters.timesheetId) {
         GenericValue timesheet = from('Timesheet').where(partyId: 
parameters.partyId).filterByDate().queryFirst()
         if (timesheet) {
-            require(!(timesheet.statusId != 'TIMESHEET_IN_PROCESS'),
+            require(timesheet.statusId == 'TIMESHEET_IN_PROCESS',
                     label('ProjectMgrUiLabels', 
'ProjectMgrCannotAddToTimesheet'))
             timesheetId = timesheet.timesheetId
         } else {

Reply via email to