Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0052435 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] Core | major | have not tried | 2023-05-12 10:57 | 2023-05-30 09:19 | |||
Reporter | AugustoMauch | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 23Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0052435: When a grid has selected records and is sorted, different records are then selected | |||||||
Description | Currently we store the selected records in a grid using their position in the grid as key. When that grid is resorted, those selected records might occupy different positions, but after sorting those records might no longer be selected, the new selected records will be the ones that now occupy the positions the selected records used to occupy. See attached image. | |||||||
Steps To Reproduce | - Apply the attached patch. - Open storybook, select the Grid -> Sorting -> Order by column definition story - Select the first record, then click on the First name header to resort the grid. Notice that the original record is no longer selected, but the record that now occupies the first position is. | |||||||
Tags | No tags attached. | |||||||
Attached Files | SortingWithSelection.gif [^] (186,091 bytes) 2023-05-12 10:57
sortableMultipleSelection.diff [^] (1,950 bytes) 2023-05-12 11:04 [Show Content] | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0149695) hgbot (developer) 2023-05-15 12:10 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1098 [^] |
(0149696) hgbot (developer) 2023-05-15 12:13 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1791 [^] |
(0149697) hgbot (developer) 2023-05-15 12:14 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.product.label.printing/-/merge_requests/21 [^] |
(0150442) hgbot (developer) 2023-05-30 04:38 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.product.label.printing [^] Changeset: ea8e6d4b9903223d48867e65570382e8299cd2f8 Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 15-05-2023 12:13:23 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.product.label.printing/-/commit/ea8e6d4b9903223d48867e65570382e8299cd2f8 [^] Related ISSUE-52435: Adapts to API change: ids are used as keys in selected records of grid --- M web-jspack/org.openbravo.pos2.product.label.printing/src/components/PrintProductLabel/PrintProductLabelSelectProdStep/PrintProductLabelProductListGrid/PrintProductLabelProductListGrid.jsx --- |
(0150443) hgbot (developer) 2023-05-30 04:38 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.product.label.printing/-/merge_requests/21 [^] |
(0150444) hgbot (developer) 2023-05-30 04:38 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^] Changeset: 909d630fab95d3b510be098b525c494880b195a2 Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 29-05-2023 13:36:42 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/909d630fab95d3b510be098b525c494880b195a2 [^] Related ISSUE-52435: Adapts to API change: ids are used as keys in selected records of grid --- M web-jspack/org.openbravo.pos2/src/components/Cashup/CashupSteps/CountDisplay/CountDisplay.jsx M web-jspack/org.openbravo.pos2/src/components/Cashup/CashupSteps/SelectCashToKeepStep/SelectCashToKeepStep.jsx M web-jspack/org.openbravo.pos2/src/components/Cashup/CountingToolDialog/CountingTool/CountingTool.jsx --- |
(0150445) hgbot (developer) 2023-05-30 04:38 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1791 [^] |
(0150446) hgbot (developer) 2023-05-30 04:38 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: b1b36743cb98217957f2bc92ba97d66c2292935e Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 29-05-2023 14:37:32 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/b1b36743cb98217957f2bc92ba97d66c2292935e [^] Fixes ISSUE-52435: Sorting a grid with selected records works now The problem was that the object we use to maintain the list of selected records was using the index of the record in the moment when it was selected as key. If the grid was then resorted, instead of the originally selected records being selected, the new records that now occupy their positions will be. To fix this problem, the object that keeps track of the selection will use as keys the ids of the selected rows --- M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/BaseRowRender.jsx M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/DataGrid.jsx M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/SelectionFunctions.js M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/SelectionModel.js M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/__test__/SelectionFunctions.test.js M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/__test__/SelectionModel.test.js --- |
(0150447) hgbot (developer) 2023-05-30 04:38 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: 6f34cce01df65e4f95cbadf988ea19c1903710fa Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 29-05-2023 14:37:32 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/6f34cce01df65e4f95cbadf988ea19c1903710fa [^] Related to ISSUE-52435: No to pass whole row on selection, as rowId might not be enough if grid is reordered --- M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/DataGrid.jsx M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/SelectionModel.js M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/__test__/SelectionModel.test.js M web-jspack/org.openbravo.core2/src/components/Grid/createDetailsGrid.jsx --- |
(0150448) hgbot (developer) 2023-05-30 04:38 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1098 [^] |
(0150464) hgbot (developer) 2023-05-30 09:19 |
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2 [^] Changeset: 29a811ddf60910eba9d90b16ed4c9a5219c145e3 Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 30-05-2023 09:19:11 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/commit/29a811ddf60910eba9d90b16ed4c9a5219c145e3 [^] Related to ISSUE-52435: Fixes DataGrid.test.jsx, includes ids in rows --- M web-jspack/org.openbravo.core2/src/components/Grid/DataGrid/__test__/DataGrid.test.jsx --- |
Issue History | |||
Date Modified | Username | Field | Change |
2023-05-12 10:57 | AugustoMauch | New Issue | |
2023-05-12 10:57 | AugustoMauch | Assigned To | => AugustoMauch |
2023-05-12 10:57 | AugustoMauch | File Added: SortingWithSelection.gif | |
2023-05-12 10:57 | AugustoMauch | Triggers an Emergency Pack | => No |
2023-05-12 10:57 | AugustoMauch | Status | new => scheduled |
2023-05-12 11:04 | AugustoMauch | File Added: sortableMultipleSelection.diff | |
2023-05-15 12:10 | hgbot | Note Added: 0149695 | |
2023-05-15 12:13 | hgbot | Note Added: 0149696 | |
2023-05-15 12:14 | hgbot | Note Added: 0149697 | |
2023-05-30 04:38 | hgbot | Note Added: 0150442 | |
2023-05-30 04:38 | hgbot | Note Added: 0150443 | |
2023-05-30 04:38 | hgbot | Note Added: 0150444 | |
2023-05-30 04:38 | hgbot | Note Added: 0150445 | |
2023-05-30 04:38 | hgbot | Resolution | open => fixed |
2023-05-30 04:38 | hgbot | Status | scheduled => closed |
2023-05-30 04:38 | hgbot | Fixed in Version | => 23Q3 |
2023-05-30 04:38 | hgbot | Note Added: 0150446 | |
2023-05-30 04:38 | hgbot | Note Added: 0150447 | |
2023-05-30 04:38 | hgbot | Note Added: 0150448 | |
2023-05-30 09:19 | hgbot | Note Added: 0150464 | |
2023-12-14 07:21 | sreehari | Relationship added | causes 0053498 |
Copyright © 2000 - 2009 MantisBT Group |