Skip to content
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

Feature: Show user-relevant update entries #204

Open
michihdeu opened this issue Jul 26, 2017 · 10 comments
Open

Feature: Show user-relevant update entries #204

michihdeu opened this issue Jul 26, 2017 · 10 comments
Labels
enhancement Updates Issues related to updates.php Userpages user/{index.php,region.php,system.php,topstats.php}

Comments

@michihdeu
Copy link
Contributor

http://tm.teresco.org/devel/updates.php

It should be possible to reduce the "Updates to Highway Data in Active Systems" table to show only entries which are traveled by the selected user.

http://tm.teresco.org/forum/index.php?topic=1889.msg7034#msg7034

It should be possible, to filter the reduced table as described in #203

@yakra

This comment was marked as outdated.

@jteresco jteresco added enhancement Userpages user/{index.php,region.php,system.php,topstats.php} labels Jul 8, 2018
@michihdeu michihdeu added the Updates Issues related to updates.php label Jun 7, 2020
@yakra
Copy link
Contributor

yakra commented Nov 28, 2020

select date, root, description from clinchedRoutes as clin right join updates on clin.route = root where traveler = 'yakra';

@michihdeu
Copy link
Contributor Author

If I get the last post right, the info is already in the db?

There should be two lists like in the log file:

  • List of user relevant update entries since project start (or first user appearance?)
  • List of user relevant update entries since last user list file update (like reduced list at beginning of user log file)

I'd still love to see all new route entries of all regions where the selected user has travels. A first step could be two full list of all* entries of the regions traveled:

  • List of user regions update entries since project start (or first user appearance?)
  • List of user regions update entries since last user list file update (including duplicates to previous lists)

@yakra
Copy link
Contributor

yakra commented May 9, 2021

If I get the last post right, the info is already in the db?

Yes and no.
Some of the info is; we have less capability than what we're able to put in the log files.
The info that makes it into the DB can't determine whether a route segment was explicitly .listed, or was just added due to multiplex detection.
So, let's say I .list ME US202 ME5_S ME5_N, and me.us202 & me.me005 both have updates entries.
• My .log file would only show the US202 entry, since only US202 was explicitly .listed.
• The DB query above will see that I have travels on both routes (it doesn't know how I got this mileage) and show both updates.

The DB does not contain any info about when a .list has been updated.
We can't do last user list file update or first user appearance, but we can do project start of course.
Almost as good (?), we can do update entries from a user-specified date, such as from a QS param or UI element.

I'd still love to see all new route entries of all regions where the selected user has travels.

Problem is, there are also route added, added route, and however many other ways of describing such, in among the "plain English" updates text. Making a useful filter would be hard, and would probably require a rethink of how updates.csv is done. Adding a new data column is no easy feat with >5300 lines already... But then, maybe you say "a first step" because you already realize this... ;)

A first step could be two full list of all* entries of the regions traveled:

There's another step we need before getting this far -- the region column. Right now, entries like (USA) Texas don't correspond to any other database fields. If we replaced with standard region codes, we could do lookups & JOINs & useful stuff like that. Converting should be doable with a bit of effort. Some spreadsheet and/or shell script magic...

With a little SQL/PHP-fu, we might be able to detect regions in countries with >1 regions, and keep roughly the same appearance on the updates page.
DEU-BW -> (Germany) Baden-Wurttemberg
NS -> (Canada) Nova Scotia
Complicatiions:
Most countries where this is done use the country's name field. I see at least 2 exceptions:
USA is the country's code instead.
UK = GBR;United Kingdom
Rather than add a new column for how to display a country on the updates page, if we wanted to maintain this formatting, we could just hard-code exceptions for USA & GBR...

@michihdeu
Copy link
Contributor Author

michihdeu commented May 9, 2021

So, let's say I .list ME US202 ME5_S ME5_N, and me.us202 & me.me005 both have updates entries.
• My .log file would only show the US202 entry, since only US202 was explicitly .listed.
• The DB query above will see that I have travels on both routes (it doesn't know how I got this mileage) and show both updates.

Can we feed the DB from what we enter in the .log file? I mean, it is all user-dependent stuff, not route-dependent...

Problem is, there are also route added, added route, and however many other ways of describing such, in among the "plain English" updates text. Making a useful filter would be hard, and would probably require a rethink of how updates.csv is done.

I made a proposal but it was called overkill

@yakra
Copy link
Contributor

yakra commented May 9, 2021

Can we feed the DB from what we enter in the .log file? I mean, it is all user-dependent stuff, not route-dependent...

Yes. In siteupdate, each TravelerList object contains a list of chopped Routes explicitly .listed by the traveler.
This could be tracked as a new boolean field in the existing clinchedRoutes DB table.

@jteresco
Copy link
Contributor

Is there enough value added in trying to get user-specific filtering on the updates page now that log files have notes added about relevant updates?

@yakra
Copy link
Contributor

yakra commented May 25, 2022

Still useful IMO. Log files only have the most recent update for each route for the sake of brevity. A Web-based utility would be a good way to get a more complete list.

@michihdeu
Copy link
Contributor Author

Is there enough value added in trying to get user-specific filtering on the updates page now that log files have notes added about relevant updates?

Yes!

@yakra
Copy link
Contributor

yakra commented Jul 11, 2023

Can we feed the DB from what we enter in the .log file? I mean, it is all user-dependent stuff, not route-dependent...

Yes. In siteupdate, each TravelerList object contains a list of chopped Routes explicitly .listed by the traveler.
This could be tracked as a new boolean field in the existing clinchedRoutes DB table.

Oops. Forgot about this when #502 closed yakra#202.
Easy enough to revert though, and it didn't save very much time.

This could also be implemented as a TMBitset, but it'd take a bit of work to get there.

  • Faster
  • May or may not save RAM; gotta do the math & try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Updates Issues related to updates.php Userpages user/{index.php,region.php,system.php,topstats.php}
Projects
None yet
Development

No branches or pull requests

3 participants