Opened 11 years ago
Closed 10 years ago
#27283 closed enhancement (fixed)
WP_Date_Query missing column user_registered
Reported by: | ChriCo | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 3.8 |
Component: | Query | Keywords: | has-patch commit needs-docs |
Focuses: | Cc: |
Description
In WP_Date_Query-Class theres a missing column "user_registered" and no support for it in WP_User_Query.
We've to add the missing Column in WP_Date_Query-Class on Method validate_column
and add the query_var on WP_User-Query-Class.
Attachments (2)
Change History (12)
#2
@
11 years ago
- Keywords has-patch needs-refresh added
- Milestone changed from Awaiting Review to 4.0
I like where this is going
This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.
10 years ago
#4
@
10 years ago
- Keywords commit needs-unit-tests added; needs-refresh removed
- Milestone changed from 4.0 to Future Release
I uploaded a cleaned up patch. Looking at the tests, though, it doesn't look like there are any functional assertions here. It's simply comparing that the SQL output of a WP_Date_Query instance is returning the same WHERE as the WP_Date_Query instance inside WP_User_Query. That's insufficient as they could all be returning nothing and the whole thing would pass.
We need to essentially borrow Tests_Comment_DateQuery or Tests_Query_DateQuery and make our own Tests_User_DateQuery in tests/phpunit/user/datequery.php.
Moving out of 4.0, though this is simple enough we can bring it back in if tests are written.
#6
@
10 years ago
- Keywords needs-unit-tests removed
- Milestone changed from Future Release to 4.1
- Owner set to boonebgorges
- Status changed from new to accepted
I got this.
#8
follow-up:
↓ 9
@
10 years ago
- Keywords needs-docs added
- Resolution fixed deleted
- Status changed from closed to reopened
Let's add a line to the filter changelog about the new column added to the array, please :-)
#9
in reply to:
↑ 8
@
10 years ago
Replying to DrewAPicture:
Let's add a line to the filter changelog about the new column added to the array, please :-)
Oh, you.
Added patch with unit-tests