After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 704445 - Cannot use sheet-less reference for conditional formats' expressions
Cannot use sheet-less reference for conditional formats' expressions
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other All
: Normal enhancement
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-07-18 08:18 UTC by vertra
Modified: 2013-07-21 20:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test file to easily reproduce problem with conditional formatting (1.81 KB, application/x-gnumeric)
2013-07-18 08:18 UTC, vertra
  Details
Tentative patch (855 bytes, patch)
2013-07-21 00:25 UTC, Morten Welinder
accepted-commit_now Details | Review

Description vertra 2013-07-18 08:18:05 UTC
Created attachment 249473 [details]
Test file to easily reproduce problem with conditional formatting

When creating a conditional format concerning a *different* cell using a logical expression, the cell's name is being autocompleted with the sheet's name. Duplicating the sheet does not update the entry for the conditional formatting, causing the conditional format to break.

How to reproduce:

Take the attached file, duplicate Sheet 1, got to Sheet 1 (2), change value of cell A1 to 1, go to cell B1, double click it and press enter to trigger update. The text will not turn red. Go back to Sheet 1, change value of A1 to 1, go back to Sheet 1 (2), double click cell B1 and press enter. The text now will be red.
Comment 1 Andreas J. Guelzow 2013-07-18 09:08:53 UTC
Note that with any current version of Gnumeric the format is updated automatically so the description in this bug report depends on running an ancient version of Gnumeric.

Note that there really isn't a bug here since the conditional formatting uses sheet specific addressing.

You really are asking for an enhancement to allow for sheet relative addressing so that on can refer to cells on the current (ie same) sheet.
Comment 2 vertra 2013-07-18 12:39:57 UTC
Hi, Andreas

(In reply to comment #1)
> You really are asking for an enhancement to allow for sheet relative addressing
> so that on can refer to cells on the current (ie same) sheet.

So this is the intended behaviour? o.O That doesn't make sense. :/
Comment 3 Jean Bréfort 2013-07-18 12:45:50 UTC
This is anaogous to #684192, and might have the same origin.
Comment 4 Morten Welinder 2013-07-19 14:08:27 UTC
This is indeed the same as bug 684192.

Once we have a reference with an explicit sheet "Sheet1!B2", then that should
duplicate as "Sheet1!B2" and therefore still refer to Sheet1.  To get the
behaviour of a reference to the current sheet, "B2" should be used and that
should duplicate as "B2" and therefore reference the new sheet.

The trouble is, one cannot do that right now.
Comment 5 Morten Welinder 2013-07-21 00:25:44 UTC
Created attachment 249728 [details] [review]
Tentative patch

This might work.
Comment 6 Andreas J. Guelzow 2013-07-21 19:29:12 UTC
I don't recall any reason why a sheet name should be required.
Comment 7 Andreas J. Guelzow 2013-07-21 19:33:09 UTC
Review of attachment 249728 [details] [review]:

THis looks good to me and appears o work just fine. I probably just for got that flag when I wrote this code.
Comment 8 Morten Welinder 2013-07-21 20:51:25 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.