Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting contact's articles order #15962

Merged
merged 1 commit into from
May 22, 2017

Conversation

infograf768
Copy link
Member

@infograf768 infograf768 commented May 11, 2017

Pull Request for Issue #15856

Testing Instructions

Create a contact for a user who is the author of some articles, make sure to set different Publishing dates for these articles and archive one of them.
Display the contact for that user in frontend. Make sure Articles are set to display.

Actual result

When displaying a contact's articles, they are displayed by Archived descendant first and then by Created date descendant.

We have
->order('a.state DESC, a.created DESC');
and
$query->where('a.state IN (1,2)') (2 is for the Archived)

This makes no sense (or should be the choice of the user, see further)

Expected result

After patching, they will be displayed by publishing date descendant.
Archives are also displayed in that order, therefore would be mixed among other articles.
This solves #15856

@AlexRed

Note: this patch could be largely improved

We may create new params to choose the way these articles are displayed:
Recently Created, Recently Published, Recently Modified (as in mod_articles_latest), and include or not Archives and Archives first/last.

I can modify this PR to include these new params. If we do, as langs are frozen for 3.7.1, it would be for a future version.

Please test patch and feedback wanted! 😄

@AlexRed
Copy link
Contributor

AlexRed commented May 11, 2017

I have tested this item ✅ successfully on 24ab819

Patch ok for me. Thanks


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

@AlexRed
Copy link
Contributor

AlexRed commented May 11, 2017

Also showing the date of publication would be great :)
and also can select the categories for the articles.

Now in Joomla with the custom fields we can finally have a personal page for the user. And the user can edit its info from the profile (only in frontend). I think it is interesting to expand this characteristic adding the parameters indicated by JM

@frostmakk
Copy link
Contributor

I have tested this item ✅ successfully on 24ab819


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

@ghost
Copy link

ghost commented May 12, 2017

RTC after two successful tests.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 12, 2017
@rdeutz rdeutz modified the milestones: Joomla 3.7.2, Joomla 3.7.3 May 12, 2017
@rdeutz rdeutz merged commit 6953ca7 into joomla:staging May 22, 2017
@joomla-cms-bot joomla-cms-bot added PR-staging and removed RTC This Pull Request is Ready To Commit labels May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants