-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Incident - reportedBy should store the currently logged in user id #2539
Comments
@blestab @jackcmeyer @morrme @TheKappa @fox1t Hi, this is James from Stanford Code the Change! I'd like to be assigned to this task |
@jameszheng405 it's yours! |
Hi @jameszheng405, |
Hi @blestab , |
Awesome! Thanks |
@blestab |
that's a good point. currently doesn't look like we have functionality to change much about user, but is good for if/when user info editing is implemented for the future.. following + will make changes as necessary for #2544 |
Hi is this issue fixed in production? |
@sshikhar1234 which production? |
I mean like in main release. Is this issue fixed or its open? |
No, if this issue is still open, I don't think so. Why? |
Previously, the extractUserName() function was returning a mocked "some user." We scaffolded out this function for when we complete the user model. fix HospitalRun#2539 fixed extractFullName import remove reportedBy make app test less spurious
i would like to contribute fixing this issue , should i submit a pull request? |
i would like to work on this one. Is it still Open? |
yep @bottercode |
I have fixed the issue, new to this so can you just tell me if you have received the pull request i made? |
@bottercode I don't see any new PR https://github.com/HospitalRun/hospitalrun-frontend/pulls. Can you link it? |
Sorry for the very late response here it is @tehkapa bottercode@d327ac1 |
@bottercode you need to do a PR in hospitalrun/hospitalrun-frontend and not on your repo |
Is it visible now? @tehkapa |
No. You can see all open PR here https://github.com/HospitalRun/hospitalrun-frontend/pulls |
@tehkapa can you please assign this to me? I was able to reproduce the issue and going through the code which handles the reported incidents. |
yes. thanks for you help! |
@tehkapa @DrewGregory is this fine? I've changed the ReportIncident.tsx to read the user name and removed 'some user' placeholder from useReportIncident.tsx |
@tehkapa I've created a PR can you please check? |
As this issue is currently open, has it been fixed? Or could I claim this issue and attempt it myself? |
Is this issue still open? I'd like to contribute. |
@tehkapa Could you please assign me to this issue? |
🐛 Bug Report
Report incident is currently hardcoded to set
reportedBy
to some user instead of the currently logged in user's id. This needs to be corrected to user the current user id from the redux store.To Reproduce
Expected behavior
incident.reportedBy
should be the currently logged inuser.id
at the time the incident is reporteduser.fullName
based on theincident.reportedBy
Notes
src/shared/components/navbar/Navbar.tsx
on how to access the user from the storeYour Environment
The text was updated successfully, but these errors were encountered: