Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050867Retail ModulesDiscounts and Promotionspublic2022-11-11 21:072022-11-16 10:13
jlopez 
jlopez 
highmajoralways
closedfixed 
5
 
 
No
0050867: Error stores list in csv file when retrieving the list of eligible stores
In discounts and promotion, there is a button called "Store perimeter report". It shows all the store link to a specific promotion.

The filters to take into account to generate the Store Perimeter Report are the following:
- Organization: the organization defined in the header of the discount.
- Included Organizations: Only those defined or All excluding defined. Organizations are defined in the "Organization" tab.
- Included Store Sets: Only those defined or All excluding defined. Store Sets are defined in the "Store Set" tab. The dates defined for the stores in the store set are taken into account to filter the report on the dates of the discount.

Each and every one of the filters must be met for the discount to apply to the stores and only the organizations whose field "Retail Organization Type=Store" will be shown.

In this case, if we add stores to both the organizations filter and the store set filter, we include only those defined in one filter and those excluded in the other filter or vice versa, and we apply for the entire discount period, the result obtained is not what is expected.

https://openbravo.atlassian.net/browse/RM-3635 [^]
Prerequisites:
- Create a regular store set S active with store B for the entire discount period and set as active

Test steps:
1. In Openbravo BackOffice, go to 'Discounts and Promotions' window and create/edit a promotion
2. Click on the 'Included Organizations' field and select 'Only those defined'
3. Go to 'Organization' tab, add stores A and B for the entire discount period and check the 'Active' box
4. Click on the 'Included Store Set' field and select 'All excluding defined'
5. Go to 'Store Set' tab, add store set S for the entire discount period and check the 'Active' box
6. Click on the button to report the store perimeter
7. Check the csv file

Expected behavior: Only A store appear.

Current behavior: Stores A and B are displayed in the file in alphabetical order.
No tags attached.
Issue History
2022-11-11 21:07jlopezNew Issue
2022-11-11 21:07jlopezAssigned To => jlopez
2022-11-11 21:07jlopezTriggers an Emergency Pack => No
2022-11-11 21:14hgbotNote Added: 0143484
2022-11-16 10:13hgbotResolutionopen => fixed
2022-11-16 10:13hgbotStatusnew => closed
2022-11-16 10:13hgbotNote Added: 0143678
2022-11-16 10:13hgbotFixed in Version => 23Q1
2022-11-16 10:13hgbotNote Added: 0143679

Notes
(0143484)
hgbot   
2022-11-11 21:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1359 [^]
(0143678)
hgbot   
2022-11-16 10:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1359 [^]
(0143679)
hgbot   
2022-11-16 10:13   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: b1721addf9738fb8b72f7d61ddb7e4e0bdf658c9
Author: Javier López <javier.lopez@precognis.com>
Date: 16-11-2022 09:13:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/b1721addf9738fb8b72f7d61ddb7e4e0bdf658c9 [^]

Fixes ISSUE-50867: Error stores list in csv file when retrieving the list of eligible stores

---
M src-test/org/openbravo/pos2/process/StorePerimeterReportTest.java
M src/org/openbravo/pos2/process/StorePerimeterReport.java
---