NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item1998: Spreadsheet Plugin $RIGHT() is broken
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Urgent |
Closed |
Extension |
SpreadSheetPlugin |
|
SpreadSheetPlugin $RIGHT() function is supposed to return the range of cells to the right of the current cell. Unfortunately, it returns cells to the left as well.
Test of RIGHT:
Col 3 below contains the expression: %CALC{"$SUM($RIGHT())"}%
The correct answers are 12 and 192. Apparently, RIGHT includes one column to the left as well.
Test of LEFT:
Col 3 below contains the expression: %CALC{"$SUM($LEFT())"}%
The correct answers above, are 3 and 48.
This works correctly.
Suggestion
Enhance $RIGHT() and $LEFT() to accept a value which is the number of cells to the right or left to include. For example $LEFT(2) would include the two cells to the left and no more.
PATCH
Attached trivial patch fixes this out by 2 error...
- Calc.diff: Patch to fix this trivial but very annoying bug
Note - made this urgent because it seems a pretty good idea to include such a trivial fix for such a complete breakage of functionality in the release.
--
DarrylGreen - 08 Aug 2010
Good move. Fix merged to trunk, thanks Darryl!
--
CrawfordCurrie - 09 Aug 2010