Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Display Time only as Positive Values #453

Open
mboneil10 opened this issue Mar 12, 2018 · 5 comments
Open

Display Time only as Positive Values #453

mboneil10 opened this issue Mar 12, 2018 · 5 comments

Comments

@mboneil10
Copy link
Contributor

In development mode, I ran into the following issue:

screen shot 2018-03-12 at 12 50 11 pm

Should probably say "early" or "on time" next to the clock symbol. Not sure if this is also happening in production.

@dfaulken
Copy link
Contributor

They're two separate data points, right? The status of the bus and its EDT? Arguably we're just accurately reporting inconsistent data.

@werebus
Copy link
Member

werebus commented Mar 14, 2018

I'm not 100% sure, but I believe @akaplo found that the only two values ever reported were "Late" and "On Time". Indeed that is the case e.g. right now:

$ curl -s --header 'Accept: application/json' 'https://bustracker.pvta.com/InfoPoint/rest/Vehicles/GetAllVehicles' | jq '.[] | .DisplayStatus' | sort -u
"Late"
"On Time"

$ curl -s --header 'Accept: application/json' 'https://bustracker.pvta.com/InfoPoint/rest/Vehicles/GetAllVehicles' | jq '.[] | .Deviation' | sort -n
-5
-5
-4
-2
0
#...
0
1
#...
6
7
9
9
10
12
20

@werebus
Copy link
Member

werebus commented Mar 14, 2018

Ugh. At first I thought, "Oh, look! there's a field OpStatus that sometimes contains the string "EARLY", perhaps that's a good source of information." Nope. Take a look at this grab-bag of 🐮

@akaplo
Copy link

akaplo commented Mar 21, 2018

Right, a vehicle's DisplayStatus is either On Time or Late. Unfortunately, best approach for our users is probably to check for a negative Deviation, flip DisplayStatus to whichever it isn't equal to, and strip out the negative. Ugh!

@mboneil10
Copy link
Contributor Author

mboneil10 commented Mar 21, 2018

I think with this one @werebus, @sherson and I decided that it would be best to ask Avail if we can display "Early" or strip out the negative without any bad side effects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants