-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Refine chronological display of published notes that were previously saved as drafts #9985
Comments
Thanks! We actually did forward-date the post, but maybe some pages sort by revision timestamp instead of node timestamp? plots2/app/controllers/notes_controller.rb Lines 413 to 420 in a578843
If so, we should be able to add a couple more lines there. Do you think this is worth writing a test against, or should we just make the additions and see if it works upon publishing? |
I think we'd just do this, just after line 419: @node.latest['timestamp'] = DateTime.now.to_i # odd assignment needed due to legacy Drupal column types
@node.save |
Also, can you double check whether a recently published draft URL matches the publication date/time? According to the quoted code above, we are setting the URL correctly, just not the revision timestamp. But it's possible we have that wrong too, do you have an example of a published draft we can examine to confirm? Thanks! |
How about examining this case?
|
Thanks, that's very helpful. OK, so we have a few places where sorting happens:
So with the exception of (2) above, this simple fix should solve it, and if you are OK not fixing this on the older dashboard. Is the https://publiclab.org/research page going to be used enough that we should try to solve it there too? |
The minimal fix is now in testing at #9989 |
ah great detective work! Yes, i believe the staff are going to be looking at the firehose view to make sure we're not missing anything, so let's also fix this for /research please. Thank you for sorting this out. |
#9989 was merged, and if you can test it out on stable that would be great. Fixing it on firehose view is a bit more involved, I'll look into it in the coming week. Thanks! |
I think this could involve changing this line to sort by revision.timestamp instead: plots2/app/controllers/home_controller.rb Lines 89 to 95 in a7bcc17
But i'm not sure what the ramifications are of that change. It could just work. Or it could cause unexpected issues. I think the best way forward is to just try it out in a pull request. @TildaDares would you have any interest in trying this change out? It'd intended to help sort draft notes by their final publication date, rather than their unique id. If not, no worries! |
@jywarren I’ll take a look at it |
Please describe the desired behavior.
Returning to a comment from @jywarren from #2667 (comment) that was not taken up at that time. It's about updating the date when publishing posts that were drafted, and saved as drafts, on an earlier date:
This would be very helpful as currently if someone publishes a draft even from a week ago, there's too much newer activity for it to even show up on the first page of latest results.
cc @steviepubliclab
The text was updated successfully, but these errors were encountered: