My initial task is to get a list of nodes that were updated since a given timestamp.
It was clear to me that using the node->changed and views.get method I will be able to make it happen.
Unfortunately, getting into it, I understand that to get this kind of query I need to use filter, and not argument.
Am I wrong ?
So, if filters are required, the existing views.get don't do the work.
The solution, I guess, it to as an additional field to the views.get, with some kind of key-value pairs, and set the filters accordingly.
Any suggestion ?
Is there any other simpler way to do it ?
Regards,
Shushu
Comments
Comment #1
kylebrowning commentedComment #2
shushu commented@kylebrowning - does making this a support request instead of feature request means this feature exists, and I just need to understand how to use it ?
If this does not exist - why is it a support request ? Or maybe I don't understand the different categories properly...
Comment #3
kylebrowning commentedWell, 2.x is feature frozen, so really this is a support request to see if its possible.
Why cant you use arguments?
I just made a view with view with the updated date as argument, passed in the time and it worked,
Comment #4
shushu commentedWhen you say "worked" I believe you mean it gives results, but the question is what are those results.
With argument, you can get the nodes that were changed in a given date, as you can see in the SQL created from your view:
While I need is the nodes changed since X, as created when using filter:
So, any suggestion ?
Comment #5
shushu commentedI understand the branch is feature freeze, but since this is what I am working on, here is the patch.
Works great for me.
Comment #6
marcingy commentedPatches are always against head
Comment #7
shushu commentedPatch against 6.x-2.x
Comment #8
marcingy commentedOn thinking more about this I'm not happy to commit the patch to be honest as it changes the api. Number of comments though that might help to get this in, can we remove the browser related code, the display is available as a parameter it just needs to be explictly passed in.
Can we have more meaning variable names $arr, what is this? Of course I can tell what it is but a proper name would make it fair easier to read the code.
Why is this being called twice
The second call certainly is unneeded.
Comment #9
marcingy commentedComment #10
shushu commentedSorry for the double get_item (will be removed) and for the $arr name (will be fixed).
Regarding to the API change - it is just an addition, can't we live with that ?
Comment #11
marcingy commentedThanks for doing those changes.
I need to speak to others on the services team to decide if we want to put it in, plus it would be ideal if others who use the views service can also test the issue and let us know if it has any impact on existing views. There is the a possibility it could get in if there is no impact in that area.
Comment #12
shushu commentedFix code based on @marcingy feedback
Comment #13
marcingy commentedLooks like the same patch as in #7, I assuming you just attached the wrong one?
Comment #14
shushu commentedNew to git, I didn't commit...
But after commit, creating a patch makes a patch file per commit (so I get two files).
Any idea how to create a "merged" patch ?
Thanks
Comment #15
marcingy commentedThis isn't going to go into 2.x and 3.x now has its own views project
Comment #16
digitalfrontiersmediashushu,
Despite this not being committed to 2.x branch, I am still very much interested in the same thing, and I'm using the 2.x branch. Any chance you can still post the updated patch or list code or send me a copy?
Thanks!
Stephen
Comment #17
shushu commentedno problem.
just remind me if I forget sending it to you in couple of days...