Closed (fixed)
Project:
IMP
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Anonymous (not verified)
Created:
21 Nov 2013 at 21:12 UTC
Updated:
22 Jul 2017 at 12:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chx commented> the nodes must be set to pull the *original* version, not the latest version.
Nope. We are not doing this. Nodes and revisions are going to be saved completely separately, node migration being, revision migrate being another, each revision as a separate row.
Comment #2
Anonymous (not verified) commentedComment #3
chx commentedComment #4
chx commentedComment #5
chx commentedComment #6
pcambraComment #7
pcambraHere's a preliminar version, it might be a little horrible as I'm not sure how to test this.
Discussing with chx, node revisions should get the revisions but the current one in the query, including the CCK fields. As cck doesnt store revisions separately, the prepareRow should be fine so NodeRevision class extends Node.
Also, Node.php has changed a little for nor doing the query twice in prepareRow.
Comment #8
benjy commentedThis breaks the node migration and the node source. Can we fix them up?
Also, you're probably aware, but the node revision test doesn't pass either?
Comment #9
chx commented$this->select($cck_table, 'f')->condition(f.vid, $row->getSourceProperty('vid')). This likely will unbreak the tests #8 mentions.otherwise great work, thanks much.
Comment #10
pcambraHere's another iteration, thanks for the reviews.
Node revision tests are still not passing, but node ones are fixed with what chx suggested.
The problem I'm having is that I was assuming that the expected results for the Node tests were just fine and that was too much to assume, I think we should provide a different set of expected results as the Join changes a lot (Node tests should include only latest revision, and Node revision tests should include all but the latest revision).
I've included 4 node revisions in the expected results, but I'm not sure how the joins are being done because its getting the 4 from node (no join) plus 6 more (?) from the join in the executeJoins() method of FakeSelect.php, here:
Also removed the $nodeFields property, but I'm having some issues on the expecting results checking for title in node instead of node_revisions.
Comment #11
benjy commentedHeres a copy of the test that passes, this test is quite complicated but it's fine for now.
Comment #12
pcambraDiscussing with benjy this morning, I think we might want to alter the migration to create a couple of nodes manually in the setUp method and have the revisions part in the expected results, but limit those to all revisions but the latest one and leave the fields attached to each revision?
Comment #13
chx commentedThat sounds in line with what we are doing for other tests: we create vocabularies, fields etc as necessary.
Comment #14
chx commentedComment #15
chx commentedThe node revision migration is committed.
Comment #16
chx commentedComment #18
alimac commentedMinor tag cleanup - please ignore.