Author Topic: Routes Traveled/Routes Clinched bug  (Read 4511 times)

0 Members and 2 Guests are viewing this topic.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2364
  • Last Login:Today at 12:59:52 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #15 on: July 12, 2019, 04:54:46 pm »
Topics merged.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2364
  • Last Login:Today at 12:59:52 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #16 on: July 12, 2019, 06:25:25 pm »
Possibly related, possibly not:
http://forum.travelmapping.net/index.php?topic=2451
We'll have to keep an eye on the one thing as we fix the other thing...

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2364
  • Last Login:Today at 12:59:52 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #17 on: July 13, 2019, 09:41:08 pm »
https://github.com/TravelMapping/Web/pull/325
This may not be merged or put on the production site just yet, but in the meantime you can test it out on my mirror site.
Big thanks to mikeandkristie for finding both the problem and solution upthread!
« Last Edit: July 13, 2019, 11:24:05 pm by yakra »

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2364
  • Last Login:Today at 12:59:52 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #18 on: July 18, 2019, 12:46:57 am »
Mileage rank is also buggy in region.php.

http://travelmapping.net/user/region.php?u=yakra&rg=NY ranks me as # 42 in both the Active and the Active+Preview tables.
Down in the Travelers in Region NY table, I'm on the # 42 line for each. But looks can be deceiving: @dave1693 has 0.27 more active miles but is ranked below me.

On Lab2, This is differently sorted, and I'm on the # 43 line on the Active Systems table. But the rank still has me at # 42, not # 43.

Why?
  • The SQL query is ORDER BY activePercentage DESC, instead of, say, activeClinched.
  • @dave1693 & I have the same activePercentage; we're incorrectly listed as tied. This is because activePercentage comes out of the SQL already rounded. We could not round it in the SQL query, instead having PHP round it when it's time to echo it to HTML.
Fixing either one of these bullet points should be sufficient to squash this bug.
« Last Edit: July 18, 2019, 02:54:11 am by yakra »

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2364
  • Last Login:Today at 12:59:52 pm

Offline mikeandkristie

  • Jr. Member
  • **
  • Posts: 79
  • Last Login:Yesterday at 11:57:34 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #20 on: July 18, 2019, 12:02:26 pm »
Awesome!  Glad I could help.

Mike

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1559
  • Last Login:Today at 02:15:39 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #21 on: July 18, 2019, 01:05:54 pm »
This is live on tmtest.  If all looks good, we can move it over to the production server.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1559
  • Last Login:Today at 02:15:39 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #22 on: July 19, 2019, 01:17:40 pm »
Any objections or concerns with me installing the latest version now on tmtest onto the production server?

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2364
  • Last Login:Today at 12:59:52 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #23 on: July 19, 2019, 03:50:42 pm »
I have none.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1559
  • Last Login:Today at 02:15:39 pm
Re: Routes Traveled/Routes Clinched bug
« Reply #24 on: July 19, 2019, 09:59:18 pm »
All the latest in GitHub and what was on tmtest is now live on the production server.  Thanks for all the work on these improvements!