Auto-navigate to new organization after creation
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
Research direction
Start in app/main/organizations.py at add_organization and read the existing create flow; then review the related harvest-source change in #6418. Update the integration coverage in tests/integration/app/test_forms.py and the Playwright create/destroy flow. Done means successful creation opens the new organization page with the confirmation and any conflict warning, while save failures return to the form with the error.
Written by the indexing model from the issue text.
Description
User Story
In order to verify a new organization and start adding harvest sources to it, a harvest admin wants to land on the new organization's page after creating it.
Acceptance Criteria
- GIVEN I am logged in to the harvest admin
WHEN I submit the Add Organization form successfully
THEN I am taken to the new organization's page (/organization/<id>)
AND the "Added new organization" message shows on that page - GIVEN the new organization has both a repository URL and an exemption flag
WHEN I submit the form
THEN the conflict warning also shows on the new organization's page - GIVEN the organization fails to save
WHEN I submit the form
THEN I stay on the add form with the error message
Background
- Today a successful create redirects to the organization list (
app/main/organizations.py,add_organization), so the user has to find the new org in the list. - Same change made for harvest sources in #6418 (harvester PR GSA/datagov-harvester#1050).
Security Considerations (required)
None. Redirect target is built from the new org's ID with url_for, not from user input.
Sketch
- Change the success redirect in
add_organizationtourl_for("main.view_organization", org_identifier=org.id) - Redirect failures back to the add form instead of the list
- Update integration tests in
tests/integration/app/test_forms.pyand the Playwright create/destroy flow
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 207
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GSA/data.gov
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
blocked form submission shows home pagePossibly taken @FuhuXia claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
idle-in-transaction for harvest record selectionPossibly taken @theyottaboy claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Harvester pagination: add page-number navigation to paginationPossibly taken @jaredb96 claimed this 24 days ago. Openbug Harvester
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day