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

1135 remove street_edge_assignment_count table #1328

Merged
merged 8 commits into from
Oct 25, 2018

Conversation

misaugstad
Copy link
Member

Resolves #1135

NOTE: Do not review this PR until PR #1319 (updating mission infrastructure) and #1327 have been merged. I branched this code off of the code in that PR instead of the code on develop.

This PR removes the buggy street_edge_assignment_count table that we no longer had a need for.

  1. Use an older database dump that has DC only partially audited.
  2. Compile and run code and go to the audit page.
  3. Check what region you are in by running svl.neighborhoodContainer.getCurrentNeighborhood().getProperty("regionId"); in the browser console.
  4. Check what street you are auditing by running svl.taskContainer.getCurrentTask().getStreetEdgeId(); in the browser console.
  5. Check whether the street you are auditing has been audited by any user before by running svl.taskContainer.getCurrentTask().streetCompletedByAnyUser(); in the browser console.
  6. Verify that the previous value is correct by querying the database to check using this query:
    SELECT * FROM audit_task WHERE completed = TRUE AND street_edge_id = <street_edge_id>;.
  7. In the region_completion table, check the audited_distance column for your region.
  8. Audit the street. After you finish, check the audited_distance column again. If the street had already been completed by a user, the audited distance should not have changed, but if it had not already been audited, then the audited distance should increase slightly.
  9. Do the above test for a few streets, making sure to get some streets that have not been audited by anyone, and some that have. Also try both with regular auditing and with jumping. Audited distance should not increase if you jump and say you want to explore another area.

@ghost ghost assigned misaugstad Oct 15, 2018
@misaugstad misaugstad changed the title 1135 remove street edge asmt count table 1135 remove street_edge_assignment_count table Oct 16, 2018
@misaugstad
Copy link
Member Author

Okay @aileenzeng this one should be ready now!

@aileenzeng aileenzeng self-assigned this Oct 20, 2018
@aileenzeng
Copy link
Member

  • From step 5: after running svl.taskContainer.getCurrentTask().streetCompletedByAnyUser();, I got this message: VM754:1 Uncaught TypeError: svl.taskContainer.getCurrentTask(...).streetCompletedByAnyUser is not a function at <anonymous>:1:36

I'm using a new database, but I got this message when I visited the audit page (for the first time):
image
After I completed one street, it gave me this message:
image

Severity ratings don't seem to be working (maybe there's a typo somewhere?)

  • The smiley faces in the context menu aren't changing color when I use keyboard controls to rate severity (but it will change color if I hover/click on a rating).
  • The yellow smiley faces are showing the rating from the last smiley face clicked
  • Can't get past the onboarding tutorial because nothing happens when I rate a label. sbt is giving me this:
[error] play - Cannot invoke the action, eventually got an error: java.util.NoSuchElementException: head of empty list
[error] application - 

! @79j4hkoi7 - Internal server error, for (POST) [/task] ->

play.api.Application$$anon$1: Execution exception[[NoSuchElementException: head of empty list]]
	at play.api.Application$class.handleError(Application.scala:296) ~[play_2.10-2.3.8.jar:2.3.8]
	at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.10-2.3.8.jar:2.3.8]
	at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.8.jar:2.3.8]
	at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.8.jar:2.3.8]
	at scala.Option.map(Option.scala:145) [scala-library-2.10.5.jar:na]
Caused by: java.util.NoSuchElementException: head of empty list
	at scala.collection.immutable.Nil$.head(List.scala:337) ~[scala-library-2.10.5.jar:na]
	at scala.collection.immutable.Nil$.head(List.scala:334) ~[scala-library-2.10.5.jar:na]
	at models.mission.MissionTable$$anonfun$isOnboardingMission$1.apply(MissionTable.scala:139) ~[na:na]
	at models.mission.MissionTable$$anonfun$isOnboardingMission$1.apply(MissionTable.scala:138) ~[na:na]
	at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withSession(DatabaseComponent.scala:34) ~[slick_2.10-2.1.0.jar:na]

@misaugstad
Copy link
Member Author

Sorry but could you try testing this again actually? I am not getting any of these errors... In particular this error:
svl.taskContainer.getCurrentTask(...).streetCompletedByAnyUser is not a function

Makes it look like your javascript is not synced up correctly. And I'm just not experiencing any of the bugs you mentioned there when I tried testing again just now 😬 I feel like it is more likely that something is messed up in your dev environment 😅

@jonfroehlich
Copy link
Member

jonfroehlich commented Oct 22, 2018 via email

@aileenzeng
Copy link
Member

Reset my dev environment - didn't get any of the errors above (hooray!) Everything checks out now :)

@misaugstad
Copy link
Member Author

Sweet deal! Merging now then!

@misaugstad misaugstad merged commit a1f7547 into develop Oct 25, 2018
@ghost ghost removed the pull-request-submitted label Oct 25, 2018
@misaugstad misaugstad mentioned this pull request Nov 29, 2018
@misaugstad misaugstad deleted the 1135-remove-street-edge-asmt-count-table branch March 25, 2020 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants