Bug 164889 - EDITING Update Selected Field with Automatic Update Fields off
Summary: EDITING Update Selected Field with Automatic Update Fields off
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Fields
  Show dependency treegraph
 
Reported: 2025-01-28 13:47 UTC by Michael Otto
Modified: 2025-10-17 10:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
image with caption and cross reference, Automatic Update Fields off (25.59 KB, application/vnd.oasis.opendocument.text)
2025-01-28 13:47 UTC, Michael Otto
Details
*no* Automatic Update Fileds saved in file (25.61 KB, application/vnd.oasis.opendocument.text)
2025-10-17 09:41 UTC, Michael Otto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Otto 2025-01-28 13:47:06 UTC
Created attachment 198800 [details]
image with caption and cross reference, Automatic Update Fields off

PRECONDITION:
Tools > Options > LibreOffice Writer > General: Automatic Update Fields _not_ selected
Insert > Image, Insert Caption with Category Illustration
Insert > Cross-reference Type Illustration, Selection "Illustration 1: ...", Refer using: "Category and Number"
(see attached Cross-reference.odt)

PROBLEM DESCRIPTION:
change cross reference to be shown:
select Cross-reference "Illustration 1" and Edit > Fields, change "Refer using:" from "Category and Number" to "Number"
update the cross reference:
select Cross-reference "Illustration 1" and context menu: Update Selected Field ==> still "Illustration 1" (NOK)
update all cross references:
Tools > Update > Update All or Fields (F9) ==> changes to "1" (OK)

N.B.: deleting the category in the caption does not update the cross-reference, 
      but inserting the category in the caption does update the cross-reference at once


EXPECTED BEHAVIOR:
Update Selected Field does the update as well if Automatic Update Fields is off


Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 2; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Buovjaga 2025-10-16 19:56:30 UTC
Bibisected the change with linux-64-7.6 to 309469a3863c1ce7a2d463f3a62f5101c39ac89c
RES_REFMARKFLD_UPDATE no more (lots of zombie code)

However, the previous behaviour was that the update happened immediately after changing the type, which does not seem correct either considering we just deactivated the automatic update in the options. So I will not mark this as a regression just yet.

I also noticed that deactivating the option is not persistent - I had to do it every time I opened the document. Strangely, the Chart option got deactivated and stayed so even though I did not touch it.
Comment 2 Buovjaga 2025-10-17 08:43:57 UTC
After discussion in the dev chat, marking this as a regression.
Comment 3 Michael Otto 2025-10-17 09:41:36 UTC
Created attachment 203387 [details]
*no* Automatic Update Fileds saved in file
Comment 4 Michael Otto 2025-10-17 09:42:34 UTC
(In reply to Buovjaga from comment #1)
> However, the previous behaviour was that the update happened immediately
> after changing the type, which does not seem correct either considering we
> just deactivated the automatic update in the options. So I will not mark
> this as a regression just yet.

Sorry, it was my fault with the first attached file:  Automatic Update Fields 
*was* selected (I didn't know that it is saved with the file)

With the new attachment Cross-reference-noAutoUpdate.odt this is corrected.
Then the change by Edit > Fields does not update immediately.
Comment 5 Buovjaga 2025-10-17 10:11:02 UTC
(In reply to Michael Otto from comment #4)
> (In reply to Buovjaga from comment #1)
> > However, the previous behaviour was that the update happened immediately
> > after changing the type, which does not seem correct either considering we
> > just deactivated the automatic update in the options. So I will not mark
> > this as a regression just yet.
> 
> Sorry, it was my fault with the first attached file:  Automatic Update
> Fields 
> *was* selected (I didn't know that it is saved with the file)
> 
> With the new attachment Cross-reference-noAutoUpdate.odt this is corrected.
> Then the change by Edit > Fields does not update immediately.

Nothing to be sorry about: when testing, I always unchecked the option for each session.