User tests: Successful: Unsuccessful:
Pull Request for Issue # .
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'.
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.
Check Testing Instructions
Description of additional filter options.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content Language & Strings Modules |
Labels |
Added:
?
?
|
@infograf768 @brianteeman - done
@bertmert i'm not sure, someone can confirm that?
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-24 19:26:05 |
Closed_By | ⇒ | yild |
.
Status | Closed | ⇒ | New |
Closed_Date | 2017-03-24 19:26:05 | ⇒ | |
Closed_By | yild | ⇒ |
Status | New | ⇒ | Pending |
@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.
I am not convinced that this is something needed in the core - it seems to be an edge case
Status | Pending | ⇒ | Needs Review |
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.
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.
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)
@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.
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.
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.
@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
Status | Needs Review | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-01-04 19:24:45 |
Closed_By | ⇒ | brianteeman |
should you not check that the value entered is an integer?