Yes,

but if you are using one warehouse (e.g. "WebStoreWarehouse") the statement is very simple:

update REQUIREMENT set FACILITY_ID = 'WebStoreWarehouse' where FACILITY_ID is null and REQUIREMENT_TYPE_ID = 'PRODUCT_REQUIREMENT'

You can eneter the sql command in the Webtools-->Entity SQL Processor
(after a backup!)

Jacopo


iain wrote:
Hi Jacopo,

This seems pretty reasonable. I'm currently testing r552815. I'll have to knock up a query to set the facilityId for those existing requirements with a null value (I need to handle the migration for a production DB).

Cheers, Iain

Will
Jacopo Cappellato (JIRA) wrote:
[ https://issues.apache.org/jira/browse/OFBIZ-1134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511360 ]
Jacopo Cappellato commented on OFBIZ-1134:
------------------------------------------

Iain,

in rev. 554878 I've modified the requirement creation services to always fill the facilityId with the facility for which the requirement is intended for.
This should solve your problem.


Inconsistent treatment of null search parameters
------------------------------------------------

                Key: OFBIZ-1134
                URL: https://issues.apache.org/jira/browse/OFBIZ-1134
            Project: OFBiz
         Issue Type: Bug
         Components: order
   Affects Versions: SVN trunk
           Reporter: Iain Fogg
           Assignee: Jacopo Cappellato
            Fix For: SVN trunk


Prelude:
To easily observe this problem, you need to modify a form definition. In applications/order/webapp/ordermgr/requirement/RequirementForms.xml to allow the facilityId field to accept an empty value by changing <drop-down allow-empty="true">.
Assumption:
+ Your list of approved requirements include some with and without a value for facilityId.
Scenario:
+ In the OrderMgr application, go to the "Requirements" screen and select "Approved Product Requirements". + By default, the Supplier field will be empty, and the form displays all requirements for all suppliers, irrespective of facilityId. + Select a Supplier (preferrably one with some requirements with a facilityId and some without), leave the facilityId empty, do the lookup, and the result is an empty list. Select a valid facilityId, do the lookup, and it returns the list of requirements for than supplier that have the relevant facilityId. + Clear the facilityId AND the Supplier, do the lookup, and you get the full list of approved requirements. For some reason, the application correctly interprets an empty facilityId as DON'T CARE when there Supplier is empty, but is doing something else when a Supplier is selected. Note: I observe this problem because I am testing on a snapshot of a production database that include requirements that may or may not have the facilityId field populated. In fact, the reason I have lots of requirements without a facilityId is because these are being generated by the Requirement Method Enum related secas. (Not sure if that is important but thought I'd mention it).





Reply via email to