Undo mark all read

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
cbrannon
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 Nov 2013, 22:52

Undo mark all read

Postby cbrannon » 02 Nov 2013, 22:56

I've marked a bunch of articles as read when I shouldn't have. I'm hoping there is a timestamp in the database I can search for that corresponds to that action and flip a 'read/unread' bit on those. I'm poking around in the DB now but if someone can point me to the right table(s)/column(s) that would be helpful.

Thanks,
Chris

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Undo mark all read

Postby fox » 02 Nov 2013, 23:58

ttrss_user_entries.last_read

cbrannon
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 Nov 2013, 22:52

Re: Undo mark all read

Postby cbrannon » 03 Nov 2013, 00:27

In case this is useful for others, I fixed it with:

UPDATE `cbrannon_ttrss`.`ttrss_user_entries` SET `ttrss_user_entries`.`unread` = '1' WHERE `ttrss_user_entries`.`last_read` = '2013-11-02 18:31:17'

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Undo mark all read

Postby sleeper_service » 03 Nov 2013, 00:39

*thumbs up*

bastage
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 18 Mar 2013, 23:11

Re: Undo mark all read

Postby bastage » 03 Nov 2013, 07:37

Awesome tip .. thankfully I've never screwed up too badly but for the few times I've had to "fix" a personal user error like this I've done it manually so I'm definitely bookmarking this.

guly
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 01 Aug 2014, 19:30

Re: Undo mark all read

Postby guly » 11 Nov 2014, 17:43

+1 for a plugin that adds "undo mark all as read" function :)

Bob
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 22 Jun 2013, 03:08

Re: Undo mark all read

Postby Bob » 20 Nov 2014, 23:56

Oops. Thanks for the query, i would never have found that out in my panicked state ;)
Attachments
Screen Shot 2014-11-20 at 20.55.07.png
Oops
Screen Shot 2014-11-20 at 20.55.07.png (37.76 KiB) Viewed 6620 times

norm
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 02 May 2013, 23:55

Re: Undo mark all read

Postby norm » 26 Jan 2015, 15:55

Thanks! Solved my "Mark as read" user failure :)

k0OAhV
Bear Rating Trainee
Bear Rating Trainee
Posts: 7
Joined: 22 Jun 2014, 18:29

Re: Undo mark all read

Postby k0OAhV » 10 Feb 2015, 00:35

Code: Select all

UPDATE "public"."ttrss_user_entries"
SET "unread" = 't'
WHERE "ttrss_user_entries"."last_read" = '2015..'


This worked for me, :D

NGPriest
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 07 Oct 2015, 17:11

Re: Undo mark all read

Postby NGPriest » 31 Jan 2016, 20:51

I kinda did

DELETE FROM ttrss_user_entires
WHERE last_read=2016-01-31 hh:mm:ss

And kinda deleted all the rows...
What can i do now? :S

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: Undo mark all read

Postby sleeper_service » 01 Feb 2016, 03:21

NGPriest wrote:I kinda did

DELETE FROM ttrss_user_entires
WHERE last_read=2016-01-31 hh:mm:ss

And kinda deleted all the rows...
What can i do now? :S


this is where the term "backups" comes into play.

aratistern
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 27 Mar 2014, 12:29

Re: Undo mark all read

Postby aratistern » 11 Feb 2016, 13:08

For PostgreSQL on a terminal I had to do a few more steps (?):

Code: Select all

sudo -u USERNAME psql


Connect to your database:

Code: Select all

\connect DATABASENAME


Find out the exact time when the "Mark as read" happened:

Code: Select all

SELECT last_read FROM ttrss_user_entries;


This will output a single column with values for all entries in your database. You will see a date/time repeat a lot, that is the exact time when the "Mark as read" happened. In my case for example:
2016-02-11 09:10:24.577955
Write it down / copy it.

Then run:

Code: Select all

update ttrss_user_entries set unread = 't' where last_read='2016-02-11 09:10:24.577955';

Code: Select all

update ttrss_user_entries set last_read = NULL where last_read='2016-02-11 09:10:24.577955';


I noticed that it will take some time / clicking around in the web interface until the unread badges are correctly updated...

With thanks to http://randomjct.blogspot.co.uk/2013/08 ... t-rss.html

rcaputo
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 22 Feb 2016, 06:14

Re: Undo mark all read

Postby rcaputo » 22 Feb 2016, 06:23

I saw a suggestion to make this a plugin. If someone's writing one, this more sophisticated/overengineered query might help:

Code: Select all

SELECT last_read, COUNT(last_read) AS ct
FROM ttrss_user_entries
GROUP BY last_read
HAVING COUNT(last_read) >= 10
ORDER BY last_read DESC
LIMIT 20;

pcause
Bear Rating Master
Bear Rating Master
Posts: 144
Joined: 23 Aug 2013, 19:52

Re: Undo mark all read

Postby pcause » 22 Feb 2016, 15:40

I have actually built and am testing a plugin to extended mark read and also add a mark unread. The plugin allows you to:

- select your timeframe : N {hours/days/weeks/months}
- qualify by search keywords, using the same syntax as the tt-rss search
- mark the items that match the above read or unread.

Use the code from the base "mark read" command for a start and also the function that creates the search string. The thing that isn't working yet is the mark read/under on the top level of labels if you have a search criteria specified. Also, I've only tested postgresql, as that is what I use. I have the mysql code there but it is untested. I expect to have this ready for others to try late this week or on the weekend.

adhawkins
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 22 Nov 2013, 18:37

Re: Undo mark all read

Postby adhawkins » 19 Dec 2016, 19:30

pcause wrote:I have actually built and am testing a plugin to extended mark read and also add a mark unread.

[snip]

I expect to have this ready for others to try late this week or on the weekend.


Have you made any progress on this? I've just inadvertantly marked all of my unread articles as read. While I managed to undo it using direct database access, having an easy way to undo this would be useful.

Thanks

Andy


Return to “Support”

Who is online

Users browsing this forum: No registered users and 4 guests