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

User may be sent to incorrect doc after editing ballot position when using multiple tabs/windows #7287

Closed
1 task done
jennifer-richards opened this issue Apr 3, 2024 · 2 comments
Assignees
Labels

Comments

@jennifer-richards
Copy link
Member

Describe the issue

If a user is reviewing / editing ballots for two or more documents in different browser tabs or windows they may be taken to the wrong document after saving a ballot position.

To reproduce:

  1. Log in to a dev instance/sandbox as an AD and navigate to /iesg/discusses/
  2. Duplicate the browser tab. Call the original tab A and the new tab B.
  3. In tab A, click on the first document's name (leftmost column) then select the "IESG evaluation record" tab
  4. Switch to tab B. click on the second document's name then select the "IESG evaluation record" tab
  5. Switch back to tab A and click the "Edit position" button near the top. Click "Save"
  6. Notice that you're now at the "IESG evaluation record" page for the document in tab B, not the one that was in tab A

The problem is that the views_doc.document_ballot() view puts its URL in the session as ballot_edit_return_point and the views_ballot.edit_position() view uses this value (when available) to set the return URL. When multiple tabs / windows are in use, these can get out of sync.

Need to straighten this out. Keep in mind that this mechanism is used to allow the ballot edit view to return to different places depending on how it was reached. It is accessed at least from the document_ballot() view and the IESG agenda's view. Searching for places that ballot_edit_return_point is set in the session should identify the places it might need to return to.

Code of Conduct

@jennifer-richards
Copy link
Member Author

As a workaround: If you reload the page in the browser immediately before clicking the "Edit position" button each time then this bug should not occur. I.e., reload before clicking the button in step 5 of the instructions above.

@Luis900927

This comment was marked as spam.

@holloway holloway self-assigned this Aug 5, 2024
holloway added a commit to holloway/datatracker that referenced this issue Aug 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants