? ? Pending

User tests: Successful: Unsuccessful:

avatar yild
yild
23 Mar 2017

Pull Request for Issue # .

Summary of Changes

New additional filter option that can hide articles modified later than provided value of minutes after create date/time.
This is useful for articles list with Date Range Field set to Modified Date - atm we can see all modified articles even when modified=created. My PR will allow to hide articles modified within i.e. 20 mins from creating date/time.
I.E we have two lists on a web page - recently created articles and recently modified. Without my code recently modified will show all articles even if modified value is null (newly created). There are times that users create article and after posting them they make a simple modification (i.e. spelling) and we don't want to list those articles as 'modified'.

Testing Instructions

Add new module of type Articles-Category. Set Modified Later Than value to 0 (default), Date Range Field to "modified date".

Create a few articles, after a while (a few mins. i.e. 5) modify some of them.
Go to web page - all articles should be visible.
Modify Set Modified Later value to 4 (mins).
Go to web page - all articles that was modified within those 4 mins after creation date/time should be invisible, only those modified > 4 min should be on list.

Expected result

Check Testing Instructions

Documentation Changes Required

Description of additional filter options.

avatar yild yild - open - 23 Mar 2017
avatar yild yild - change - 23 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2017
Category Front End com_content Language & Strings Modules
avatar yild yild - change - 23 Mar 2017
Labels Added: ? ?
avatar infograf768
infograf768 - comment - 24 Mar 2017

should you not check that the value entered is an integer?

avatar yild
yild - comment - 24 Mar 2017

@infograf768 @brianteeman - done

@bertmert i'm not sure, someone can confirm that?

avatar yild yild - change - 24 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-24 19:26:05
Closed_By yild
avatar yild yild - close - 24 Mar 2017
avatar yild
yild - comment - 24 Mar 2017

.

avatar yild yild - change - 24 Mar 2017
Status Closed New
Closed_Date 2017-03-24 19:26:05
Closed_By yild
avatar yild yild - change - 24 Mar 2017
Status New Pending
avatar yild yild - reopen - 24 Mar 2017
avatar bertmert
bertmert - comment - 25 Mar 2017

@yild
Code is easier to read/understand if you use upper-case words for SQL statements like SELECT, DROP, ORDER BY, INTERVAL, MINUTE and so on. That's why I suggested to change line

$query->where('(a.modified > (a.created + interval ' . $this->getState('filter.modified_later_than', 0) . ' minute))');

like this:

$query->where('(a.modified > (a.created + INTERVAL ' . $this->getState('filter.modified_later_than', 0) . ' MINUTE))');

Thus it's clearer that interval or minute are not table fields/columns but SQL statements.

avatar yild
yild - comment - 25 Mar 2017

@bertmert kk, I get your point

avatar brianteeman
brianteeman - comment - 25 Mar 2017

I am not convinced that this is something needed in the core - it seems to be an edge case


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Status Pending Needs Review
avatar wojsmol
wojsmol - comment - 27 Jul 2017

@mbabker What do you think about this, are there chances to add this in Joomla 3.8.x?

avatar mbabker
mbabker - comment - 27 Jul 2017

Personally agree with Brian, seems like an edge case scenario. Personal feelings aside, without anyone indicating they've tested this, it's not going anywhere.

avatar wojsmol
wojsmol - comment - 27 Jul 2017

@mbabker With 2 successful tests until Friday would be a chance?

avatar mbabker
mbabker - comment - 27 Jul 2017

That'll help, but at the end of the day if we evaluate the feature and decide it's not something that really fits into core, we won't merge it.

Plus, this will need testing/review against non-MySQL databases.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

For me this is an edge case that should be solved with a custom module (you could easily fork the core module and install that)

avatar wojsmol
wojsmol - comment - 27 Jul 2017

I will test it tonight
cc @csthomas for non-mysql testing.

avatar wojsmol
wojsmol - comment - 27 Jul 2017

@brianteeman This add 8 line of php code and 1 parameter in xml. More changes will require the creation of a fork than a change in the core.

avatar brianteeman
brianteeman - comment - 27 Jul 2017

Maybe but speaking personally if something is to go into core then it should be something that many people will use. We can't put everything in the core just because there is code. We have far too many options already. More options makes Joomla harder to use for everyone. Plus don't forget it's not just 8 lines of code. There is documentation and ongoing support to consider as well.

avatar mbabker
mbabker - comment - 27 Jul 2017

It's not about the number of lines of code being added, or even what it does. Is it a functionality that there is a true need to support in core for a measurable number of our users? There's no argument that it's not a nice to have thing if you need it, but it doesn't come across as something that a large number of users are looking for.

avatar wojsmol
wojsmol - comment - 27 Jul 2017

@mbabker @brianteeman I contacted @yild should speak out soon, he may convince you. I can do as much as I can, that is to test and try to get a second tester ?

avatar brianteeman
brianteeman - comment - 4 Jan 2018

I am closing this for the reasons stated by myself and @mbabker above.

avatar brianteeman brianteeman - change - 4 Jan 2018
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2018-01-04 19:24:45
Closed_By brianteeman
avatar brianteeman brianteeman - close - 4 Jan 2018

Add a Comment

Login with GitHub to post a comment