Bug 114998 - Externally Linked Data should update when pressing F9
Summary: Externally Linked Data should update when pressing F9
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-External-Datalink
  Show dependency treegraph
 
Reported: 2018-01-14 07:42 UTC by Dan Dascalescu
Modified: 2019-11-06 16:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Dascalescu 2018-01-14 07:42:31 UTC
Pressing F9 on a cell with a =WEBSERVICE formula, fetches new data from the URL and recalculates (https://help.libreoffice.org/Calc/Recalculate).

Pressing F9 should also update data inserted via Sheet -> Link to External Data.

As a first step to making this possible, it would help if the linked data were visible to the user - see bug 114997.
Comment 1 m_a_riosv 2018-01-15 23:35:12 UTC
External links can be updated through Menu/Edit/Links, they are not a formula.
Comment 2 Dan Dascalescu 2018-01-16 05:17:01 UTC
Whether we as developers think external links are formulas or not, from a user's perspective, external links *are* much like formulas. A user could be linking to a sheet of currency prices that are updated externally by a server, just like =WEBSERVICE would fetch that URL.

Let's adopt a user-centric mindset and consider adding link update via F9 as a feature.
Comment 3 Xisco Faulí 2018-01-17 09:09:46 UTC
You can't confirm your own bugs. Moving it back to UNCONFIRMED until someone
else confirms it.
Comment 4 Heiko Tietze 2018-02-12 17:34:25 UTC
Use case makes sense when you fill the sheet with stock exchange data, weather, ot many other information that needs an automatic but also manual update. 

For example: =MID(WEBSERVICE("http://tycho.usno.navy.mil/timer.html");166;21) (shows the current time in UTC but F9 doesn't update)
Comment 5 m_a_riosv 2018-02-12 18:23:07 UTC
(In reply to Heiko Tietze from comment #4)
> ...
> For example:
> =MID(WEBSERVICE("http://tycho.usno.navy.mil/timer.html");166;21) (shows the
> current time in UTC but F9 doesn't update)
But hard recalc does the update [Ctrl+Shift+F9]
Comment 6 Heiko Tietze 2018-02-12 18:30:09 UTC
(In reply to m.a.riosv from comment #5)
> But hard recalc does the update [Ctrl+Shift+F9]

Not for me, I need to change the formula (Linux/Fresh). And anyway, as long we do not understand webservice as an add-in functions it shouldn't depend on normal vs. hard recalculate.
Comment 7 m_a_riosv 2018-02-12 21:51:10 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to m.a.riosv from comment #5)
> > But hard recalc does the update [Ctrl+Shift+F9]
> 
> Not for me, I need to change the formula (Linux/Fresh). And anyway, as long
> we do not understand webservice as an add-in functions it shouldn't depend
> on normal vs. hard recalculate.

A formula like:
=MID(WEBSERVICE("http://tycho.usno.navy.mil/timer.html");166;21)&IF(TODAY();"")
works for me with [F9], because it has a valatile function like TODAY()
With autoupdate it's calculated every time some cell is modified, it's how volatile funcitions work.

IMHO having WEBSERVICE() as volatile could make inoperable the spreedsheet when large files/pages are retrieved. If I'm not wrong one of the main purpose of the function is to work in combination with FILTERXLM().

Maybe having the Eike opinion will be the best.
Comment 8 Heiko Tietze 2018-02-16 10:40:33 UTC
After thinking about F9 or Ctrl+F9 I agree with the hard recalculate idea. We should make sure that it updates all links to external data (doesnt work for me) and change the help respectively (add-ins and external data, or the like).
Comment 9 m_a_riosv 2018-02-16 12:55:52 UTC
(In reply to Heiko Tietze from comment #8)
> After thinking about F9 or Ctrl+F9 I agree with the hard recalculate idea.
> .(doesnt work for me)..
Maybe because is Shift+Ctrl+F9?
Comment 10 Heiko Tietze 2018-02-16 14:21:58 UTC
(In reply to m.a.riosv from comment #9)
> Maybe because is Shift+Ctrl+F9?

Nope. Neither clicking a button after adding Hard Recalc to the toolbar works.
Comment 11 Eike Rathke 2018-02-19 19:12:47 UTC
I think we should not update externally linked data on F9 or Shift+Ctrl+F9, because that is what the LinkManager under menu Edit -> Links to External Data is for. This bug was submitted with the example of the WEBSERVICE function, for which the data previously could not be updated other than editing the formula using it, but now (master, 6.0.1 and 5.4.5) the link passed to WEBSERVICE is added to the LinkManager as well. Any recalculation should be done with the *current* data available in the spreadsheet document.
Comment 12 QA Administrators 2019-02-20 03:47:59 UTC Comment hidden (obsolete)
Comment 13 Cor Nouws 2019-02-26 21:28:31 UTC
(In reply to Dan Dascalescu from comment #0)
> Pressing F9 should also update data inserted via Sheet -> Link to External
> Data.
However: 

(In reply to Eike Rathke from comment #11)
> I think we should not update externally linked data on F9 or Shift+Ctrl+F9,
> because that is what the LinkManager under menu Edit -> Links to External
> Data is for. This bug was submitted with the example of the WEBSERVICE
> function, for which the data previously could not be updated other than
> editing the formula using it, but now (master, 6.0.1 and 5.4.5) the link
> passed to WEBSERVICE is added to the LinkManager as well. Any recalculation
> should be done with the *current* data available in the spreadsheet document.
Represents a clear application behavior logic. So NotABug here.
Comment 14 Andreas Schmid 2019-11-06 16:18:54 UTC
The problem with the LinkManager is that it is completely unusable for the WEBSERVICE use case -- every link looks the same in the list, only for the selected one the "Source file" row down below displays a hint what item it refers to, and this item can be on any sheet in the file.
Thus, if you have >300 such WEBSERVICE cells, distributed over several sheets, there is no way you can find the particular cell you want to update right now.
And even if would display this info within one of the columns, this LinkManager then just represents a different table with less usability, where I would like to work directly in the table that is the actual sheet I'm working with.

Thus, updating the particular cell by pressing F9 is the only "clear application behavior logic" right now.