? Pending

User tests: Successful: Unsuccessful:

avatar davidjosephhayes
davidjosephhayes
18 Oct 2016

Pull Request for Issue # .

Summary of Changes

Set JTable and JModelAdmin to use the JTable::_columnAlias property for ordering. Defaults to original behavior when there is no ordering property of JTable::_columnAlias.

Basically this implements what the function documentation for JTable::getColumnAlias says:
* Method to return the real name of a "special" column such as ordering, hits, published
* etc etc. In this way you are free to follow your db naming convention and use the
* built in Joomla functions.

Testing Instructions

Use any built in component and reorder items.

Documentation Changes Required

None.

avatar davidjosephhayes davidjosephhayes - open - 18 Oct 2016
avatar davidjosephhayes davidjosephhayes - change - 18 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 18 Oct 2016
Category Libraries
avatar davidjosephhayes davidjosephhayes - change - 19 Oct 2016
The description was changed
avatar davidjosephhayes davidjosephhayes - edited - 19 Oct 2016
avatar davidjosephhayes
davidjosephhayes - comment - 19 Oct 2016

I updated the code comments where it is throwing an exception instead of setting an error and returning false.

avatar davidjosephhayes
davidjosephhayes - comment - 24 Oct 2016

Is there something else I should change?

avatar davidjosephhayes
davidjosephhayes - comment - 1 Nov 2016

bump

avatar andrepereiradasilva
andrepereiradasilva - comment - 1 Nov 2016

needs two successfull tests to get merged in the core.

avatar csthomas
csthomas - comment - 22 Nov 2016
avatar davidjosephhayes
davidjosephhayes - comment - 22 Nov 2016

Both should be fixed now @csthomas

avatar RonakParmar
RonakParmar - comment - 30 Nov 2016

I have tested this item successfully on fd08d7b

Tested ordering of articles before and after PR, in both case ordering working fine.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12464.

avatar RonakParmar RonakParmar - test_item - 30 Nov 2016 - Tested successfully
avatar csthomas
csthomas - comment - 30 Nov 2016

What about other files:

libraries/joomla/table/nested.php:1299:  if (property_exists($this, 'ordering'))
libraries/joomla/table/asset.php:168:    if (property_exists($this, 'ordering'))

I'm not sure but IMHO nested.php should be changed too.

avatar davidjosephhayes
davidjosephhayes - comment - 30 Nov 2016

Never used those classes. I bet you are right.

I will run through the rest of the libraries and see if there are others.

avatar mbabker
mbabker - comment - 30 Nov 2016

Only JTable and JTableNested need to have this abstraction layer. The other subclasses are "final" implementations for each table.

avatar davidjosephhayes
davidjosephhayes - comment - 30 Nov 2016

I added the abstraction layer to JTableNested.

I feel like it should be on JTableAsset as well @mbabker since it is using a variable for the table name.

avatar mbabker
mbabker - comment - 30 Nov 2016

A lot of the JTable subclasses reference the class variables in the methods versus hardcoding things like the table key(s) or name. JTableAsset is the class directly mapping to the #__assets table so it shouldn't need direct mapping like the other two classes have. Unfortunately, we neither declare the base classes (JTable or JTableNested) as abstract nor the "final" subclasses as final, so by that argument every column name supported by the abstraction layer should technically be mapped in the same way in all subclasses in case they are subclassed further by other developers. Personal opinion, I don't think it's needed for instances where it's supposed to be a final object, but I'll let someone else make the final judgement call on it.

avatar davidjosephhayes
davidjosephhayes - comment - 30 Nov 2016

Gotcha. I end up extending core classes a lot, so its always nice when the abstraction is already there. However, abstracting everything is likely out of the scope of this PR.

avatar davidjosephhayes
davidjosephhayes - comment - 1 Dec 2016

That was just terrible. What I get for rushing.

avatar csthomas
csthomas - comment - 2 Dec 2016

I tested successful
and on review I have not found any ordering column in JTableNested subclasses.
It is not used by joomla at all but because of B/C it probably has to stay.
That OK.

Code style:
I thought that before if () code line there should be a comment or empty line.
Am I wrong?

avatar davidjosephhayes
davidjosephhayes - comment - 2 Dec 2016

No idea. I don't see anything in here though however: http://joomla.github.io/coding-standards/?coding-standards/chapters/php.md

avatar csthomas
csthomas - comment - 2 Dec 2016

I have tested this item successfully on 32a6436

Joomla works normal.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12464.

avatar csthomas csthomas - test_item - 2 Dec 2016 - Tested successfully
avatar davidjosephhayes
davidjosephhayes - comment - 20 Dec 2016

How does the HumanTestResults test work?

avatar dgt41
dgt41 - comment - 20 Dec 2016

I have tested this item successfully on 32a6436


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12464.

avatar dgt41 dgt41 - test_item - 20 Dec 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 20 Dec 2016
The description was changed
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 20 Dec 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12464.

avatar jeckodevelopment jeckodevelopment - edited - 20 Dec 2016
avatar jeckodevelopment jeckodevelopment - change - 20 Dec 2016
Milestone Added:
avatar zero-24
zero-24 - comment - 20 Dec 2016

How does the HumanTestResults test work?

@davidjosephhayes you can take a look here: https://docs.joomla.org/Testing_Joomla!_patches#Recording_test_results

It is a feature of ours custom issue tracker arround GitHub :)

avatar zero-24 zero-24 - change - 21 Dec 2016
Labels Added: ?
avatar zero-24
zero-24 - comment - 21 Dec 2016

With the last 4 commit i have fixed some CS Issue travis did not mention (why?) and updated this branch to the last staging.

avatar zero-24
zero-24 - comment - 21 Dec 2016

@rdeutz @wilsonge please take a final review and merge decision here.

avatar jeckodevelopment
jeckodevelopment - comment - 22 Dec 2016

@davidjosephhayes could you please look at the conflicts?

avatar davidjosephhayes
davidjosephhayes - comment - 22 Dec 2016

Is it just me or is the conflict page not loading?

avatar csthomas
csthomas - comment - 22 Dec 2016

For me it is not working too.

avatar jeckodevelopment
jeckodevelopment - comment - 22 Dec 2016

@davidjosephhayes this is the conflicting file:
libraries/joomla/table/table.php

avatar davidjosephhayes
davidjosephhayes - comment - 26 Dec 2016

How do I do know what to fix? When I click the Resolive Conflicts, nothing loads.

avatar wilsonge
wilsonge - comment - 27 Dec 2016

I should have fixed conflicts here. Can I have one tester to confirm this PR still works please

avatar RonakParmar
RonakParmar - comment - 27 Dec 2016

I have tested this item successfully on fc626b1


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12464.

avatar RonakParmar RonakParmar - test_item - 27 Dec 2016 - Tested successfully
avatar rdeutz rdeutz - reference | 4eb5371 - 27 Dec 16
avatar rdeutz rdeutz - merge - 27 Dec 2016
avatar rdeutz rdeutz - close - 27 Dec 2016
avatar rdeutz rdeutz - change - 27 Dec 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-27 10:12:10
Closed_By rdeutz
avatar rdeutz rdeutz - close - 27 Dec 2016
avatar rdeutz rdeutz - merge - 27 Dec 2016

Add a Comment

Login with GitHub to post a comment