Open iteles opened 6 years ago
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)
Oh @shouston3 made his own fix. Nevermind :smile:
@finnhodgkin I think your solution is better, would you mind making a pr
Sure thing :+1:
@shouston3 Might be good to complement @finnhodgkin's excellently simple PR with your test additions for this though 😊
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.
@shouston3 - this seems to be working on the heroku app but it's not working on my localhost, any suggestions why?
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.
@shouston3 - I tried doing that before when I was following the instructions in the readme but I was getting this error:
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.
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.
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:
And it is only on clicking 'Updated' twice that I get the updated list: