Bug 119011 - Variables defined in the same paragraph appear as a single cross-reference
Summary: Variables defined in the same paragraph appear as a single cross-reference
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: preBibisect, regression
Depends on:
Blocks: Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2018-07-30 23:10 UTC by Òscar
Modified: 2024-02-20 03:12 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice Writer. One cross-reference for two variables (28.30 KB, image/png)
2018-07-31 10:09 UTC, Roman Kuznetsov
Details
Example document (9.08 KB, application/vnd.oasis.opendocument.text)
2018-07-31 10:11 UTC, Roman Kuznetsov
Details
LibreOffice 3.3 (34.04 KB, image/png)
2018-08-02 15:23 UTC, Xisco Faulí
Details
Restart a variable and repeat the exact same context (18.46 KB, application/vnd.oasis.opendocument.text)
2019-05-18 11:51 UTC, Òscar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Òscar 2018-07-30 23:10:41 UTC
Description:
When a variable is defined twice in the same paragraph, a cross-reference to the first variable in that paragraph cannot be inserted because both variables appear as a single cross-reference in the cross-reference list.

Steps to Reproduce:
1. Open a new document and write "StepA ".
2. Create a new numbering sequence using a "number range variable" field: Go to Insert > Fields > Other, select the "Variables" page, select "Numebr range" in the "Type" list, select any type (for instance "A B C") in the "Format" list, write something (for instance "Step") in the "Name" field, and click "Insert". The letter "A" (number field) appears at the insertion point after "StepA ".
3. Press Enter and write "StepB ". Insert the variable field "Step" (select "Step" in the "Selection" list) again. The letter "B" appears after "StepB ".
4. Press Enter and write "StepC ". Insert the variable field "Step". The letter "C" appears after "StepC ".
5. Write ", step D ". Insert the variable field "Step". The letter "D" appears after "StepC C, step D ".
6. Press Enter and write "Repeat steps ". Insert the cross-reference "StepA A" to "numbering" (Go to Insert > Cross Reference, select "Step" in the "Type" list, select "Numbering" in the "Insert reference to" list, select "StepA A" in the "Selection" list, and click "Insert"). The number field "A" appears after "Repeat steps ".
7. Write " and ". Try to insert the cross-reference to "StepC C". In the "Selection" list appears the option "StepC C, stepD D". If this option is selected and isnerted, a "D" appears after "Repeat steps A and ".

Actual Results:
StepA A
StepB B
StepC C, stepD D
Repeat steps A and D

Expected Results:
StepA A
StepB B
StepC C, stepD D
Repeat steps A and C

[it should be possible to insert a cross-reference to both "StepC C" and "stepD D".]


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 6.0.5.2 (x64)
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: ca-ES (de_DE); Calc: group
Comment 1 Roman Kuznetsov 2018-07-31 10:08:50 UTC
Confirm in 6.1.0.2. 
Now we have strange behavior for this case. 
There is only one cross-reference for two variables in one paragraph.
Comment 2 Roman Kuznetsov 2018-07-31 10:09:21 UTC
Created attachment 143837 [details]
LibreOffice Writer. One cross-reference for two variables
Comment 3 Roman Kuznetsov 2018-07-31 10:11:50 UTC
Created attachment 143838 [details]
Example document
Comment 4 Xisco Faulí 2018-08-02 15:22:27 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2018-08-02 15:23:13 UTC
Created attachment 143935 [details]
LibreOffice 3.3
Comment 6 Òscar 2018-08-02 15:50:28 UTC
(In reply to Xisco Faulí from comment #4)
> Reproduced back to
> 
> Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
> 
> However, its different in
> 
> LibreOffice 3.3.0 
> OOO330m19 (Build:6)
> tag libreoffice-3.3.0.4

That make sense! I remember to have used this function without problems about 5 or 6 years ago.
Comment 7 Roman Kuznetsov 2018-08-02 16:06:38 UTC
I tried in LO 3.6.7.2. Same problem
Comment 8 Òscar 2019-01-20 11:33:16 UTC Comment hidden (obsolete)
Comment 9 Òscar 2019-05-18 11:51:38 UTC
Created attachment 151494 [details]
Restart a variable and repeat the exact same context

There is another strange behaviour related to this bug. See the attached document for details.
Let's say you have two tables with footnotes. You use a variable to number the footnotes on each table with a letter (a, b, c,...). This variable is called "TableFootnote". When you insert the footnotes in the second table, you restart the variable, so it starts again with the letter "a". Let's say the first footnote is exactly the same in both tables:
"aUnits: g/mL"
Now try to insert a cross-reference to these footnotes (both letter "a"). You will see only one option displayed in the "Cross Reference" dialogue.
Only if you modify one of the footnotes (e.g. "aUnits: g/mL..."), then you can add a cross-reference to both footnotes.

Of course, a workaround would be to name the variables "Table1Footnote" for the first table, and "Table2Footnote" for the second table, but that's still not the desired behaviour.
Comment 10 QA Administrators 2022-01-13 03:41:50 UTC Comment hidden (obsolete)
Comment 11 sdc.blanco 2022-02-19 11:00:08 UTC
repro.  Description in comment 0 is still accurate.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2bb10a827ac13d0caf009e8526ccd9f17dc71653
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: pt-BR
Calc: CL
Comment 12 QA Administrators 2024-02-20 03:12:07 UTC
Dear Òscar,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug