Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0054363
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] POSminorhave not tried2024-01-16 14:492024-02-12 07:41
ReporterlmonrealView Statuspublic 
Assigned Tosreehari 
PrioritynormalResolutionfixedFixed in Version24Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date2023-10-19
Regression introduced in release
Regression introduced by commithttps://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/7a7835ad560cc129128f19fb6147dc25ba3949f2 [^]
Triggers an Emergency PackNo
Summary

0054363: Approvals are not working for "Apply Discretionary and Optional Discount" user action under some specific circumstances

DescriptionThe user action "Apply Discretionary and Optional Discount" whose internal code is "OBPOS2_SetLineDiscounts" is not managing approvals correctly
Steps To ReproduceThe user action "Apply Discretionary and Optional Discount" which internal code is "OBPOS2_SetLineDiscounts" is not working

PRE:
Configure POS2 to use vallblanca manual role using vallbalnca user

- Login to the office using Openbravo/openbravo and connect to "White valley"
- In backoffice go to user vallblanca and select "VallBlancaManual" as the default role to be used for POS2 (Header -> more information -> default POS Role)
- Go to the role "VallBlancaManual" and add the following user actions to allow to use POS2 normally
    - Finish Initial Count
    - Standard initial count
    - Validate Cashup count and advance to next step
    - SwitchToLineDiscountPanel
    - SetDefaultSchema

- Additionaly configure the user action "Apply Discretionary and Optional Discount" as:
  - Confirmation Required: False
  - Approval: Approval Required
  - Input Request Type: Never
  - Active: yes

- Go to the role "Group - Admin" (the one used by demouser) and add the user actions "Apply Discretionary and Optional Discount" to allow to approve the usage of it with below information.
  - Confirmation Required: False
  - Approval: Can Use and Approve
  - Input Request Type: Never
  - Active: yes


STEPS TO REPRODUCE
1 Login in pos
2 Add two items to the order
3 press in one item
4 In the popover press "Discounts"
5 Having selected one line
  - Select "disc_fixed_5_perc"
  - press apply
    Error 1 -> KO! Approval does not appear
6 Remove order
7 Add two items to the new order
8 press in one item
9 In the popover press "Discounts"
10 Having selected two lines
  - Select "disc_fixed_5_perc"
  - press apply
    error 2 -> KO! Approval does not appear



Note:
If in the back office the discount "disc_fixed_5_perc" is marked as "Approval Required = true" and we repeat the above steps (after login in pos2 and executing refresh master data)
 Error 1 is not reproducible -> approval is shown -> Can be approved by using "demouser/openbravo"

This is wrong because this scenario reveals that approval only works well when a discount with approval is being used.

  Error 2 becomes different: Now A first popup appears asking for data "Data required" and after pressing "next" the correct approval appears


Summary:
1. When a user action to apply a discretionary discount requires approval it should appear without depending on the discount that is applied
2. When user action to apply a discretionary discount does not require approval but we are using at least one discount that requires approval Approval should appear
3. The Data required popup which appears when several lines are selected should not appear
Proposed SolutionAccording to the spec of RM-4672 (https://docs.google.com/document/d/1LabC70jbdRc2fIxC_2ODDpzUazjphCyGv8AUalrf9nU/edit [^])
Approval only will be shown when
1. User action is configured to show approval
2. Any discount involved is marked as "approval required"

User inputs should appear
- together with approval if approval conditions (explained above)
- alone if approval conditions are not meet (explained above)
TagsNo tags attached.
Attached Filespng file icon User Action Input Config When Defined.png [^] (67,708 bytes) 2024-01-24 12:42

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 005451324Q1 closedsreehari Approvals are not working for "Apply Discretionary and Optional Discount" user action under some specific circumstances 
caused by feature request 0053601 closedcaristu Request user action approval separately from reasons 
has duplicate defect 0054504 closedTriage Platform Base [24Q1] There is a popup for approvals that does not give enough information and does not allow to type in its text field 

-  Notes
(0159547)
hgbot (developer)
2024-01-20 08:21

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1338 [^]
(0159708)
sreehari (developer)
2024-01-24 12:44

NOTE:
When Input Request Type is Defined its user action inputs need to be configured as attached in User Action Input Config When Defined.png else it will behave like Input Request Type = Never
(0159879)
sreehari (developer)
2024-01-29 15:35

Test Case Scenarios for Discount Approval
https://docs.google.com/spreadsheets/d/1PRphzt0xhVX46anFjxsEkRTu1pzksHgfRPu7DB_pU5o/edit#gid=0 [^]
(0159956)
hgbot (developer)
2024-01-31 06:45

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2384 [^]
(0160056)
hgbot (developer)
2024-02-01 10:06

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1338 [^]
(0160057)
hgbot (developer)
2024-02-01 10:06

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^]
Changeset: ab0f97275a965799ae75a49dc2dff09f2cc10563
Author: Sreehari Venkataraman <sreehari.venkataraman.ext@openbravo.com>
Date: 01-02-2024 09:06:49
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/ab0f97275a965799ae75a49dc2dff09f2cc10563 [^]

Related ISSUE-54363: Fixed case when input request is Never

---
M web-jspack/org.openbravo.core2/src/core/user-action/UserAction.js
M web-jspack/org.openbravo.core2/src/core/user-action/__test__/UserAction.test.js
---
(0160058)
hgbot (developer)
2024-02-01 10:06

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2384 [^]
(0160059)
hgbot (developer)
2024-02-01 10:07

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: ac8192978416c12335f81c5c3ae91c9182cd010b
Author: Sreehari Venkataraman <sreehari.venkataraman.ext@openbravo.com>
Date: 01-02-2024 09:06:55
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/ac8192978416c12335f81c5c3ae91c9182cd010b [^]

Fixes ISSUE-54363: Fix wrong data input/approvals requests when applying discounts

---
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/discounts/SetLineDiscounts.js
M web-jspack/org.openbravo.pos2/src/model/ticket/user-actions/discounts/__test__/SetLineDiscountsUserAction.test.js
---

- Issue History
Date Modified Username Field Change
2024-01-16 14:49 guilleaer New Issue
2024-01-16 14:49 guilleaer Assigned To => Retail
2024-01-16 14:49 guilleaer Triggers an Emergency Pack => No
2024-01-16 14:50 guilleaer Reporter guilleaer => lmonreal
2024-01-16 14:55 guilleaer Steps to Reproduce Updated View Revisions
2024-01-18 07:54 sreehari Assigned To Retail => sreehari
2024-01-18 12:07 sreehari Status new => scheduled
2024-01-19 13:15 caristu Relationship added related to 0053601
2024-01-20 08:21 hgbot Note Added: 0159547
2024-01-20 08:22 hgbot Note Added: 0159548
2024-01-24 12:37 hgbot Note Added: 0159704
2024-01-24 12:42 sreehari File Added: User Action Input Config When Defined.png
2024-01-24 12:44 sreehari Note Added: 0159708
2024-01-24 13:58 guilleaer Note Deleted: 0159548
2024-01-24 13:58 guilleaer Note Deleted: 0159704
2024-01-24 14:34 guilleaer Proposed Solution updated
2024-01-29 15:35 sreehari Note Added: 0159879
2024-01-31 06:45 hgbot Note Added: 0159956
2024-01-31 09:01 guilleaer Status scheduled => acknowledged
2024-01-31 09:01 guilleaer Status acknowledged => scheduled
2024-01-31 10:58 guilleaer Proposed Solution updated
2024-02-01 10:06 hgbot Note Added: 0160056
2024-02-01 10:06 hgbot Note Added: 0160057
2024-02-01 10:06 hgbot Note Added: 0160058
2024-02-01 10:07 hgbot Resolution open => fixed
2024-02-01 10:07 hgbot Status scheduled => closed
2024-02-01 10:07 hgbot Fixed in Version => 24Q2
2024-02-01 10:07 hgbot Note Added: 0160059
2024-02-12 07:36 caristu Relationship added has duplicate 0054504
2024-02-12 07:40 caristu Regression date => 2023-10-19
2024-02-12 07:40 caristu Regression introduced by commit => https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/7a7835ad560cc129128f19fb6147dc25ba3949f2 [^]
2024-02-12 07:40 caristu Relationship deleted related to 0053601
2024-02-12 07:41 caristu Relationship added caused by 0053601


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker