You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Anurag Chandak (JIRA)" <ji...@apache.org> on 2016/06/18 14:06:05 UTC

[jira] [Reopened] (OFBIZ-2947) The 1st time you close a project you get an error, it works the 2d time

     [ https://issues.apache.org/jira/browse/OFBIZ-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anurag Chandak reopened OFBIZ-2947:
-----------------------------------
      Assignee: Anurag Chandak

I am able to regenerate this issue, here are the steps:
- Go to Project --> Projects
- Click on New Project
- Only enter Project Name and click on save button
- Close the current project.
- The following error is thrown
{code}
Exception thrown while creating the "newWorkEffortStatus" GenericValue: org.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:WorkEffortStatus][createdStamp,2016-06-18 19:32:55.748(java.sql.Timestamp)][createdTxStamp,2016-06-18 19:32:55.702(java.sql.Timestamp)][lastUpdatedStamp,2016-06-18 19:32:55.748(java.sql.Timestamp)][lastUpdatedTxStamp,2016-06-18 19:32:55.702(java.sql.Timestamp)][setByUserLogin,admin(java.lang.String)][statusDatetime,2016-06-18 19:32:55.748(java.sql.Timestamp)][statusId,PRJ_CLOSED(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.WORK_EFFORT_STATUS (WORK_EFFORT_ID, STATUS_ID, STATUS_DATETIME, SET_BY_USER_LOGIN, REASON, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (Column 'WORK_EFFORT_ID' cannot accept a NULL value.)) (Error while inserting: [GenericEntity:WorkEffortStatus][createdStamp,2016-06-18 19:32:55.748(java.sql.Timestamp)][createdTxStamp,2016-06-18 19:32:55.702(java.sql.Timestamp)][lastUpdatedStamp,2016-06-18 19:32:55.748(java.sql.Timestamp)][lastUpdatedTxStamp,2016-06-18 19:32:55.702(java.sql.Timestamp)][setByUserLogin,admin(java.lang.String)][statusDatetime,2016-06-18 19:32:55.748(java.sql.Timestamp)][statusId,PRJ_CLOSED(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.WORK_EFFORT_STATUS (WORK_EFFORT_ID, STATUS_ID, STATUS_DATETIME, SET_BY_USER_LOGIN, REASON, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (Column 'WORK_EFFORT_ID' cannot accept a NULL value.)))
{code}

Dig around it and found that on closing the project, workEffortId is passed as NULL.

I am working on this and will add the patch with the proper fix. 

> The 1st time you close a project you get an error, it works the 2d time
> -----------------------------------------------------------------------
>
>                 Key: OFBIZ-2947
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2947
>             Project: OFBiz
>          Issue Type: Bug
>          Components: specialpurpose/projectmgr
>    Affects Versions: Release Branch 09.04, Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Anurag Chandak
>            Priority: Minor
>             Fix For: Trunk
>
>
> ERROR: Could not complete the Update Work Effort [file:/D:/workspace/ofbizRun/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml#updateWorkEffort] process [problem creating the newWorkEffortStatus value: Error while inserting: [GenericEntity:WorkEffortStatus][createdStamp,2009-09-16 15:10:35.548(java.sql.Timestamp)][createdTxStamp,2009-09-16 15:10:35.501(java.sql.Timestamp)][lastUpdatedStamp,2009-09-16 15:10:35.548(java.sql.Timestamp)][lastUpdatedTxStamp,2009-09-16 15:10:35.501(java.sql.Timestamp)][setByUserLogin,admin(java.lang.String)][statusDatetime,2009-09-16 15:10:35.548(java.sql.Timestamp)][statusId,PRJ_CLOSED(java.lang.String)] (SQL Exception while executing the following:INSERT INTO public.WORK_EFFORT_STATUS (WORK_EFFORT_ID, STATUS_ID, STATUS_DATETIME, SET_BY_USER_LOGIN, REASON, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) (ERREUR: une valeur NULL viole la contrainte NOT NULL de la colonne « work_effort_id »))]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)