-
Notifications
You must be signed in to change notification settings - Fork 5
[PROD] "Add Report" button on emergency page redirects to general admin backend #1116
Comments
This should be a straightforward fix to ensure that the Assigning to myself for now, @kamicut @GregoryHorvath let me know if you guys have spare cycles to look and can re-assign. |
Now this is redirecting to the backend of the desired emergency! |
@batpad - a favour (sorry, I should've spotted this in original ticket) - is it easy enough to make the redirect point to the human-friendly domain (i.e. goadmin.ifrc.org, in Production) rather than the biglong prddsgocdnapi.azureedge.net version? FYI part 3 of #958 did a bunch of URL "nicing" already so it would be great if we could be consistent and always use the nice version if poss. However not if too risky of course, as it functions perfectly well with the long URL ;) THANKS A LOT! |
@batpad can you confirm if @nanometrenat's suggestion / request above is in scope and can be easily delivered please? |
The only non-hacky way to do this is to change a configuration variable application-wide. This would be good to do, I would just not be comfortable making that change without more thorough testing. Can we push that to a future release? Happy to either keep this ticket open or make a new one for the URL change. Once I look a bit more at where all this config parameter is being used and how, it is likely I will open a separate ticket. Thanks @nanometrenat for flagging and apologies for not getting back sooner on this one. |
Personally I am fine with this being in a future release as it has been how it is for quite some time and don't want to introduce risk at short notice without testing. Separate ticket is all good, thanks @batpad |
New issues created for:
Marking this ticket as Done. |
Original ask now in PROD and working well, tangent requests outlined in separate tickets. Thanks team! Closing this. |
Issue
On an emergency page in the response documents section there is a button "Add report".
Currently this redirects the user to the general Django admin page instead of the backend of the desired emergency.
Steps to reproduce
Go to an emergency that has response docs added to it (the highlighted operations on the frontpage would have these) and navigate to the Response documents section where on the right there is the "Add report" button.
Expected behaviour
Instead of redirecting the user to the general admin backend, it should direct the user to the backend of the emergency that they are trying to add the document to.
As an example: for the global COVID-19 emergency page (https://go.ifrc.org/emergencies/3972) comparing the URL of the "Add report" button (https://prddsgocdnapi.azureedge.net/admin/api/event/3972/change) and the "Edit Event" (https://prddsgocdnapi.azureedge.net/api/event/3972/change/) which correctly redirects to the right emergency backend, it seems like an easy fix of just removing the "admin" part from the URL to get it to redirect to the right emergency.
If feasible it would be great to redirect not only to the correct emergency but also to the response docs (atm Situation reports in the backend) section of that specific emergency in the backend.
Related feature
#791
Severity
Until this has been fixed, the risk of users trying to add reports through the section that gives an error (described in #1117 ) is higher. If #1117 is fixed before, this isn't as critical.
Is there a workaround?
In the backend the user can navigate to the right emergency or on the frontend use instead the "Edit event" button.
The text was updated successfully, but these errors were encountered: