-
Notifications
You must be signed in to change notification settings - Fork 140
Updating comment from /mentors/applications/:id page results in 404 #960
Comments
@kytrinyx I would like to work on this issue |
Hey @stlireri, thank you so much for offering to help on this issue! Since this is a bug that affects this year’s mentor reviewing phase, it would need to be implemented in the next few days. Would you have time to begin looking into it this weekend? I’d be happy to help you along the way and answer any of your questions if you need help. Feel free to message or ping me! We also have some other issues that are up for grabs if you’re interested in contributing and are worried about the time pressure 😄 In short, your help is highly appreciated! |
thanks @ramonh for offering to help. |
Hi @stlireri, sure thing! What's the error you're getting? |
after running "bundle exec rails db:setup", i get this error |
@stlireri it sounds like you need to run
Feel free to make the password empty (just hit enter). That's what I usually do locally unless I have production or protected data. |
Thanks for your help @kytrinyx ! That ought'a do it |
Thanks alot @kytrinyx , it finally worked! |
Nice one! I'm glad to see you're up and running. So if you haven't already, please go through the steps in the Quick start guide. Take a look at the output after running the command Hope this steers you in the right direction! If you need further help, please let me know and good luck! |
when i try to navigate to that URL, i get an error stating |
Hey! Right, so the problem here is that your local user isn't maintaining any accepted projects for your local season of RGSoC. If you take a look at the mentors controller, you'll find this line:
This right here is what's stopping you from seeing the applications. Let's take a look at the user model to find the method on this line:
Right, so we need this user to have an accepted project! If you take a look at the project model you'll see that a project has a submitter and season it belongs to. It also has a state machine, with the default state being So what we need is a There are a few ways to do this:
Of course, once you do this, you'll probably need some Phew! I hope this wasn't too much at once, and that this gets you back on track! Let me know if I can help you further, please! |
thanks @ramonh for the analysis on the flow of the application with regard to the mentors. i now understand it better. |
@stlireri after it returns false, go ahead and try |
great! it worked, i had missed a mentors email which was a required field. Thanks |
Hi @kytrinyx @ramonh |
What is the exact error you’re getting when you try to save?
|
HI @stlireri, yes please! Would be good to know the error. Furthermore, you should be able to re-assign a student from one team to another using either to console or the local teams app itself. |
i was able to use the application draft instance you gave at |
Hey @stlireri! Check out the application model, here you'll find that an Try hopping onto the Hope this helps! |
Hi @ramonh , |
Hey @stlireri, Sorry, I was unclear! What I meant was taking that application and setting it's project ID to the project you wish your user is a mentor of, you know what I mean? That is, you hop on the console and call something like the following:
Here, the validation might prevent you from saving the Application, but since we're trying to figure this out, you can skip the validations (that is, by passing Hope this helps! |
Finally i got to the error described in the issue. |
Yay! 🎉 Nice one |
The error i get when trying to update a mentors comment is |
Nice one @stlireri! Nearly there. Take a look at the form partial for comments. The So the question is, how do we distinguish between a new and existing Hope this helps! |
Hi @ramonh , |
yeah i did fork the repository already here it is. |
Looks good to me! You're good to go. |
Hi @ramonh and @kytrinyx , |
Hey @stlireri, Nice! Another step further 😄 Looks to me like there's something wrong with the Ever used |
no i haven't used pry before. I'll do install it and learn to use it along the way. |
Hey @stlireri, No need to install If you find |
I think this is what is being passed as paramters |
Right! And looking back at the error:
It seems that there's no Mentor comment with id = 1 for that application. Can you confirm this in the |
When i try to view all the comments from console here's what am getting. |
Hi @stlireri, You're absolutely correct. Mentors and project maintainers are the same. In this case, you have 2 comment instances. One for a project, and another for an application review. The Hope this helps! |
Hey @ramonh |
So it's trying to retrieve a comment with the id 1, but the comment you're updating has the id 3. We need to pass to the action the param I believe the reason it's passing the param |
yeah. So how do i update the param to i |
Hmm. Let's take another look at the form partial and the mentor comment controller. One idea is to try and go down the road of looking at the dom element in line 1 of the form partial, or somehow including the id of the comment as a hidden element. Notice that the Just throwing out ideas 😄 |
Aah niice, so from the form partial i can see the |
Well the first thing to do would perhaps be to see what params the form is passing. There are two ways to do this. You can either set up the Then we should be able to see what's coming in. One thing you could do is, like the But first, I would strongly suggest checking what's going on with those params 👍 Hope this helps! |
Hi @ramonh |
Hey @stlireri! I believe the problem comes from the fact that the You need to pass the comment's One solution would be to include the above comment ID as a hidden element. |
I have made the |
Oh nice! So you can access that comment id with calling I believe the id=1 is referring to the Application you're currently reviewing. Know what I mean? |
Thanks @ramonh, |
I was very exited to have finally solved my first issue and forgot to run the test. |
No probs! Happens to me all the time 😄 Have a look at the tests that aren't working. You should be able to see there which params are being passed or not passed that you need. :) |
Update after PR #997 (Abilities): Let's not fix it until after the User Registration Overhaul is finished. |
When reviewing applications, I am able to successfully create a comment on the mentors/applications/:id page, however when attempting to update the comment it returns a 404.
The text was updated successfully, but these errors were encountered: