https://bugs.documentfoundation.org/show_bug.cgi?id=167498

            Bug ID: 167498
           Summary: Problem With Sort in CALC Of Subsequent Lines
           Product: LibreOffice
           Version: 25.2.4.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
The problem found was that cells containing formulas are not updated correctly
when a CALC spreadsheet is sorted and the spreadsheet has values in formulas
that have cell identifiers that are in subsequent rows (or, in other words, in
a more general sense, not updated correctly, when a sort occurs, are values in
formulas that are based on identifiers of cells that are not in the row that
contains the formula).

Steps to Reproduce:
This all becomes a bit clearer with my CALC spreadsheet that is attached to
this Bugzilla Bug
1.setting up a spreadsheet in CALC for a list of bills of sale for things I
purchased [this called "Original Bills of Sale" in attached CALC spredsheet]
2.initially give each bill of sale a Category
3.further inspection of list indicates that some bills of sale contain items
for 2 categories
4.make duplicate rows for such bills of sale. For an example Bill of Sale, call
these duplicate rows Bill-A and Bill-B [this is table "Bills of Sale Split To
Take Food Out Of Clothing & Medical Bills of Sale" in attached CALC
spreadsheet]
5.Now Bill-A and Bill-B have same value but want the sum of Bill-A PLUS Bill-B
to equal "original value of this bill" (i.e., the value before the sort was
done)
6.update value of Bill-B in column-D to be "original value of this bill of
sale" minus cell-identifier of Bill-A in column-D. Call this Value-XX
7.sort by Category values (column C in the attached spreadsheet) [the result is
table "Sort Bills Of Sale by Description (column C) shows different values" in
attached CALC spreadsheet - incorrect rows are highlighted in RED]
8.See a different incorrect total in column D (Total Bills of Sale)
9.Inspect spreadsheet and see that spreadsheet assumes that Bill-A and Bill-B
are still subsequent rows and Value-XX is incorrect because Bill-A and Bill-B
are no longer subsequent rows. I show the incorrect formulas for these
calculated values in RED in column F.
10. Expect CALC spreadsheet to keep the same values for Bill-A and Bill-B by
changing the cell-identifier used for the value of Bill-B to be the
cell-identifier of Bill-B after the sort
11. Show a corrected table in spreadsheet of what expected program to do when
sorted in step #7 [this is table "Corrections Manually Made For Above Table Of
“Sort Bills Of Sale by Description (column C) shows different values” in
attached CALC spreadsheet - manually corrected rows are highlighted in GREEN] -
note: this table gets correct calculated values for Value-XX. I show the
correct formulas for these calculated values in GREEN in column F.

Actual Results:
8.See a different incorrect total in column D (Total Bills of Sale)
9.Inspect spreadsheet and see that spreadsheet assumes that Bill-A and Bill-B
are still subsequent rows and Value-XX is incorrect because Bill-A and Bill-B
are no longer subsequent rows. I show the incorrect formulas for these
calculated values in RED in column F.
10. Expect CALC spreadsheet to keep the same values for Bill-A and Bill-B by
changing the cell-identifier used for the value of Bill-B to be the
cell-identifier of Bill-B after the sort



Expected Results:
11. Show a corrected table in spreadsheet of what expected program to do when
sorted in step #7 [this is table "Corrections Manually Made For Above Table Of
“Sort Bills Of Sale by Description (column C) shows different values” in
attached CALC spreadsheet - manually corrected rows are highlighted in GREEN] -
note: this table gets correct calculated values for Value-XX. I show the
correct formulas for these calculated values in GREEN in column F.


Reproducible: Always


User Profile Reset: No

Additional Info:
please ask if this is unclear after you look at the attached CALC spreadsheet
and the formulas in of it's cells

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to