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

First opening the app shows issues only from August 2017 & before #260

Open
iteles opened this issue Dec 22, 2017 · 10 comments
Open

First opening the app shows issues only from August 2017 & before #260

iteles opened this issue Dec 22, 2017 · 10 comments

Comments

@iteles
Copy link
Member

iteles commented Dec 22, 2017

As a user
I would like to come to the application and see the latest updated issues as a default
So that I get the most immediate needs shown to me first.

At the moment, the application shows only issues from August 2017 & before this date first:
screen shot 2017-12-22 at 10 11 21

And it is only on clicking 'Updated' twice that I get the updated list:
screen shot 2017-12-22 at 10 11 32

@finnhodgkin
Copy link
Collaborator

finnhodgkin commented Dec 22, 2017

Eep I think I fixed this before I stopped working on Tudo but didn't push. I think if you swap round lines 15 and 17 of the page__controller it should fix the issue:

    initial_rummage = IssueSorting.default_sort_by(initial_rummage)

    {issues, rummage} =
      IssueSorting.collect_issues(search_params, initial_rummage)

vs the current:

    {issues, rummage} =
      IssueSorting.collect_issues(search_params, initial_rummage)

    rummage = IssueSorting.default_sort_by(rummage)

@finnhodgkin
Copy link
Collaborator

Oh @Shouston3 made his own fix. Nevermind 😄

@samhstn
Copy link
Member

samhstn commented Dec 22, 2017

@finnhodgkin I think your solution is better, would you mind making a pr

@finnhodgkin
Copy link
Collaborator

Sure thing 👍

@iteles
Copy link
Member Author

iteles commented Dec 23, 2017

@Shouston3 Might be good to complement @finnhodgkin's excellently simple PR with your test additions for this though 😊

@samhstn
Copy link
Member

samhstn commented Dec 28, 2017

My test was for my own helper function.
@finnhodgkin used a helper function which he had already written and tested, just forgot to add it in.

@Cleop
Copy link
Member

Cleop commented Feb 15, 2018

@Shouston3 - this seems to be working on the heroku app but it's not working on my localhost, any suggestions why?

@samhstn
Copy link
Member

samhstn commented Feb 15, 2018

Maybe you need to update your local database with the seed file. Something like mix run priv/repo/seeds.exs. If you clear your database before running the seeds file too, you may have to play around with the file to get it working.

@Cleop
Copy link
Member

Cleop commented Feb 16, 2018

@Shouston3 - I tried doing that before when I was following the instructions in the readme but I was getting this error:
image

I looked into the error a little but couldn't work out what was going wrong.
I tried dropping the db and starting again (following the readme commands) but I still get the same error.

@samhstn
Copy link
Member

samhstn commented Feb 16, 2018

To fix this, you basically need to try and work through understanding what the seed file is trying to do and fixing it so it works.
For this particular error, I would inspect the output of what is being passed into the function which causes this to crash (probably a function from the Enum or a Map libraries, you should put in some IO.inspects to track this down or type in each step using the IEx cli).
Try to find the line which is causing this to break and work back from there.
Sorry that I can't be more helpful.

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

No branches or pull requests

4 participants