Skip to content

[login] Allow multiple projects on account requests - #11182

Open
Montekkundan wants to merge 3 commits into
aces:mainfrom
Montekkundan:montek/11138-request-account-project-multiselect
Open

Montekkundan wants to merge 3 commits into
aces:mainfrom
Montekkundan:montek/11138-request-account-project-multiselect

Conversation

@Montekkundan

Copy link
Copy Markdown
Contributor

Brief summary of changes

  • Updates the Request Account form so users can select multiple projects.
  • Saves every valid selected project to the requested account.
  • Notifies relevant administrators for the selected projects at the chosen site.
  • Preserves support for existing requests that submit a single project.
  • Updates the Request Account test plan for multi-project registration.
image

Testing instructions

  • Open http://localhost:8081/ and click Request Account.
  • Confirm the Project field allows multiple selections and is required.
  • Select two projects, complete the required fields, and submit the request.
  • Confirm the success page appears.
  • Confirm the requested account is associated with both selected projects in user_project_rel.
  • Confirm relevant administrators for the selected projects and site receive only one notification.

Link(s) to related issue(s)

@github-actions github-actions Bot added Language: PHP PR or issue that update PHP code Language: Javascript PR or issue that update Javascript code Module: login PR or issue related to login module labels Aug 26, 2026
@skarya22
skarya22 requested a review from HachemJ September 3, 2026 15:05
Comment thread modules/login/jsx/requestAccount.js Outdated
@HachemJ

HachemJ commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Functionality wise, the PR looks good. I will approve it once the translation file cleanup is done.

The 'Project' label consistently appears in the singular form during my testing, despite the 'count: 2' parameter. This reminded me of a similar issue I encountered while working on the Biobank module, where Henri left the comment below #10801 (review). In that case, the fix was to revert to using the standalone 'Containers' key. We don’t currently have an equivalent standalone 'Projects' key here, so it may be worth looking into why the pluralization isn’t being applied correctly. This isn’t blocking the PR from my side, and I’ll approve it once the translation cleanup is done.

For future reference, I would also suggest adding a regression check to the testing instructions to confirm that the existing single project workflow still works when only one project is selected. I tested that case as well and it worked as expected, I tested that case as well and it worked as expected.

Thanks

@github-actions github-actions Bot added the Multilingual Any tasks related to making LORIS multilingual label Sep 9, 2026

@HachemJ HachemJ left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@HachemJ HachemJ added the Passed manual tests PR has been successfully tested by at least one peer label Sep 9, 2026
Comment thread modules/login/locale/fr/LC_MESSAGES/login.po Outdated

msgid "Choose your project:"
msgstr "选择您的项目:"
msgid "Projects"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HachemJ dug into the problem a little more and the problem is that the English locale doesn't have a msgid_plural for "Projects" despite the loris.pot saying it should have a plural form.

I think the solution here is:

  1. Go back to the "count: 99" to avoid needing to retranslate for every language
  2. Add msgid_plural to locale/en/LC_MESSAGES/loris.po so that it correctly picks up the plural

@HachemJ HachemJ Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@driusan thank you for the clarification. @Montekkundan can you please revert your last commit and fix the rest as instructed in the comment above? Thank you!

Note: Please assign this PR back to me so I can test it again when you are done.

@HachemJ HachemJ assigned Montekkundan and unassigned HachemJ Oct 6, 2026
@Montekkundan
Montekkundan requested a review from HachemJ October 6, 2026 19:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: Javascript PR or issue that update Javascript code Language: PHP PR or issue that update PHP code Module: login PR or issue related to login module Multilingual Any tasks related to making LORIS multilingual Passed manual tests PR has been successfully tested by at least one peer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Login/Request_Account] Make Project multi-select

4 participants