Add author updated feature to submission#4380
Conversation
frjo
left a comment
There was a problem hiding this comment.
Works well but can be simplified I think.
| label=_("Applicants"), | ||
| required=False, | ||
| ) | ||
| author.widget.attrs.update({"data-placeholder": "Select..."}) |
There was a problem hiding this comment.
Can we make this author.widget.attrs.update({"data-placeholder": "Select...", "data-js-choices": ""})?
| allowHTML: true, | ||
| }); | ||
| }); | ||
| </script> |
There was a problem hiding this comment.
With setting data-js-choices above I believe this script snippet is not needed.
|
|
||
| {% url 'funds:submissions:change_author' pk=object.pk as author_update_url %} | ||
| {% include 'funds/includes/dialog_form_base.html' with form=form value=value %} | ||
| </form> |
There was a problem hiding this comment.
The "lead" modal is much simpler, no form in form. Here there seems to be two htmx calls, is that needed?
I see that the partner modal looks like above, I suspect that is overcomplicated as well.
| </dl> | ||
| </div> | ||
|
|
||
| {% url 'funds:submissions:change_author' pk=object.pk as author_update_url %} |
There was a problem hiding this comment.
I do not think this is used anywhere.
319770d to
78224f8
Compare
4779c15 to
5561272
Compare
5561272 to
f1b3c07
Compare
|
@frjo if you have the capacity can you review this? gotten lots of requests for this feature lately. Will likely add unit tests but otherwise feels pretty good to go. would eventually love to add emails to the choice options so staff doesn't only need to rely on the display name Almost wondering if we should move the update author button to this |
| class UpdateAuthorView(View): | ||
| model = ApplicationSubmission | ||
| form_class = UpdateAuthorForm | ||
| context_name = "author_form" |
There was a problem hiding this comment.
I do not think this is actually used anywhere. Same for "UpdateLeadView".
There was a problem hiding this comment.
As in the view itself isn't used anywhere? or the context_name
There was a problem hiding this comment.
confirmed it's not used, should be set now
|
thanks for the flags @frjo! couple of issues were existing that I glazed over when I revived the PR |
|
Regarding the "Edit" link, could we make the Legal name itself into a link, for staff only, to the wagtail admin user page? Then we can remove the separate "Edit" link. |
<!-- Thanks for contributing to Hypha! Please ensure your contributions pass all necessary linting/testing and that the appropriate documentation has been updated. --> <!-- Describe briefly what your pull request changes. If this is resolving an issue, please specify below via "Fixes #<Github Issue ID>" --> Addressing the conversation [here](#4380 (comment)). Making the link to the user's wagtail admin page a little less confusing now that the "Change Author" feature exists. Also made this open in a new tab. Feels a bit more intuitive *before* <img width="160" height="92" alt="Screenshot 2026-05-21 at 09 52 43" src="https://github.com/user-attachments/assets/164f4523-983a-4ee5-9ed2-8c7bbfab9de5" /> *after* <img width="160" height="92" alt="Screenshot 2026-05-21 at 09 51 55" src="https://github.com/user-attachments/assets/afa00bac-e232-464a-bd8c-2ae54e5970d5" />
<!-- Thanks for contributing to Hypha! Please ensure your contributions pass all necessary linting/testing and that the appropriate documentation has been updated. --> <!-- Describe briefly what your pull request changes. If this is resolving an issue, please specify below via "Fixes #<Github Issue ID>" --> Fixes #4192 Staff can update the submission's author. Flow is similar to the Lead update but the button is a bit hidden in more actions. ## Test Steps <!-- If step does not require manual testing, skip/remove this section. Give a brief overview of the steps required for a user/dev to test this contribution. Important things to include: - Required user roles for where necessary (ie. "As a Staff Admin...") - Clear & validatable expected results (ie. "Confirm the submit button is now not clickable") - Language that can be understood by non-technical testers if being tested by users --> - [ ] Staff should find an option to 'Change Author' on the submission detail page in sidebar(More action). - [ ] Staff can select any applicant and assign them as an author of that submission. - [ ] New applicant should be notified about new assignment. - [ ] A slack notification should be there, like which user has replaced {old applicant} from {new_applicant}. - [ ] The new applicant's name should be updated in all the places on submission. - [ ] A new activity item should be created in the activity feed indicating the author update --------- Co-authored-by: Wes Appler <wes@opentech.fund>
<!-- Thanks for contributing to Hypha! Please ensure your contributions pass all necessary linting/testing and that the appropriate documentation has been updated. --> <!-- Describe briefly what your pull request changes. If this is resolving an issue, please specify below via "Fixes #<Github Issue ID>" --> Addressing the conversation [here](#4380 (comment)). Making the link to the user's wagtail admin page a little less confusing now that the "Change Author" feature exists. Also made this open in a new tab. Feels a bit more intuitive *before* <img width="160" height="92" alt="Screenshot 2026-05-21 at 09 52 43" src="https://github.com/user-attachments/assets/164f4523-983a-4ee5-9ed2-8c7bbfab9de5" /> *after* <img width="160" height="92" alt="Screenshot 2026-05-21 at 09 51 55" src="https://github.com/user-attachments/assets/afa00bac-e232-464a-bd8c-2ae54e5970d5" />

Fixes #4192
Staff can update the submission's author. Flow is similar to the Lead update but the button is a bit hidden in more actions.
Test Steps