Issue 120278 - Database field NEXT RECORD is set to sal_True instead of TRUE
Summary: Database field NEXT RECORD is set to sal_True instead of TRUE
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 3.4.1
Assignee: Ariel Constenla-Haile
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-14 20:50 UTC by Joe Smith
Modified: 2012-08-13 04:55 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 3.4.1_release_blocker+


Attachments
sample document for testing (245.52 KB, application/vnd.oasis.opendocument.text)
2012-07-14 20:50 UTC, Joe Smith
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Joe Smith 2012-07-14 20:50:26 UTC
Created attachment 78644 [details]
sample document for testing

In previous versions of OOo, the NEXT RECORD field advanced to the next record by default. The field's default configuration provided a condition of TRUE; as long as the user didn't change the default, the field would cause a record advance.

With AOO 3.4, the field's default condition is sal_TRUE, which does not evaluate to a true condition and the default action of the field is _no_ record advance.

If the user modifies the condition for the field to some value accepted as logically true--for example the old default value, TRUE--then the field works as before.

You can test this with the attached document, or with a simple test that includes the NEXT RECORD field (Insert > Fields > Other > Database > Type: Next Record. Use the "Data to Fields" function to copy data from the database into the fields.

Expected results: NEXT RECORD skips to the next data record

Actual results: The same data record is processed--the NEXT RECORD field has no effect.
Comment 1 Joe Smith 2012-07-14 20:52:21 UTC
PS: Tested on Fedora Linux 13; originally reported by XP user on the forum, here:
http://user.services.openoffice.org/en/forum/viewtopic.php?f=7&t=55094

This looks like a regression to me.
Comment 2 Ariel Constenla-Haile 2012-07-14 21:17:20 UTC
Bug introduced in removetooltypes01: #i112600# Remove tools types from sw
changeset 275032	c36a2e2560dd
parent 275031 	e0677c0ff137
child 275033 	f1a32d9e6a49

See http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/ui/fldui/flddb.cxx?revision=1198305&view=markup#l420
Comment 3 Ariel Constenla-Haile 2012-07-14 21:45:29 UTC
Fixed in revision 1361594
Comment 4 Ariel Constenla-Haile 2012-07-14 21:46:59 UTC
Requesting release blocker status, so that the fix can be included in AOO 3.4.1

The fix is trivial and low risk.
Comment 5 jsc 2012-07-16 05:35:08 UTC
set release blocker flag to 3.4.1, regression
Comment 6 Joe Smith 2012-07-16 13:28:15 UTC
Wow! Thanks so much for such quick attention to this. Great work!
Comment 7 SVN Robot 2012-07-16 13:30:53 UTC
"arielch" committed SVN revision 1362030 into branches/AOO34:
#i120278# - Merge fix from trunk into AOO34 branch
Comment 8 Li Feng Wang 2012-07-20 10:03:27 UTC
The NEXT RECORD field still has no effect with AOo trunk r1362376 on Windows XP.
Comment 9 Ariel Constenla-Haile 2012-07-20 16:40:13 UTC
(In reply to comment #8)
> The NEXT RECORD field still has no effect with AOo trunk r1362376 on Windows
> XP.

How are you performing your tests?
With the document attached in this bug?

Please note that the field condition is stored inside the ODT file, and the fix for this bug is not intended to fix already stored documents.

Please try with a new document:

- File - New - Text Document
- Table - Insert - Table...
- in the "Insert Table" dialog select 3 rows and 3 columns
- open the fields dialog: Insert - Fields - Other
  This dialog is modal, so that you can move the cursor to position it in the table cells while this dialog is open
- In the Fields dialog select the "Database" tab

Adding record number in first column:
- on the "Type" list, select "Record number"; on the "Database selection" select "Bibliography" - "biblio"
- position the cursor in cell A1 and press the button "Insert" in the "Fields" dialog to insert the field in that cell. Repeat the same procedure for cells A2 and A3

Adding Title in second column:
- on the "Type" list, select "Mail merge fields"; on the "Database selection", select "Bibliography" - "biblio" - "Title"
- position the cursor in cell B1, and press the "Insert" button in the "Fields" dialog to insert the field in that cell. Repeat the same procedure for cells B2 and B3

Adding the "Next record" field in the third column:
- on the "Fields" dialog, select from the "Type" list, "Next record"
  With the fix for the current bug, you should see in the "Condition" edit control the value TRUE instead of sal_True
- position the cursor in cell C1, and press the button "Insert" to insert the field in that cell. Repeat the same procedure for cells C2 and C3.


Filling the fields with data from the Bibliographic database:
- select menu "View" - "Data Sources"
- on the Data Source Browser, select from the tree list on the left: Bibliography - Tables - Biblio
- on the database table, select the first three records (the first three rows on the database table)
- select the icon "Data to fields" on the Data Source Browser toolbar

Result:

You have three different rows in the text table:

1 A Conceptual Guide to OpenOffice.org 2 for Windows and Linux
2 Practical OpenOffice.org (Practical Series)
3 Getting Started with OpenOffice.org 2.x
Comment 10 Li Feng Wang 2012-07-23 09:09:21 UTC
Yes, I used the document attached in this bug. I don't know the field condition is stored inside the ODT file. I think it can auto change to default value.

I use the steps in last comment, then NEXT RECORD have expected effects on trunk.
Comment 11 Li Feng Wang 2012-07-25 06:58:09 UTC
Verify pass on AOO341 branch r1364591.
Comment 12 jsc 2012-07-25 09:27:09 UTC
set target milestone AOO 3.4.1
Comment 13 Joe Smith 2012-08-13 04:55:23 UTC
Testing
OpenOffice.org 3.4.1  341m1(Build:9593)
on Fedora Linux 17

Confirmed ok.

Note: Documents create by 3.4, including the test document attached still show problem because the problem is recorded in the document. New documents, created by following steps from description above work correctly.