Skip to content

[dtq-dev-93] Warn when the share link e-mail was not sent - #1761

Open
milanmajchrak wants to merge 1 commit into
dtq-dev-93from
93/fe-share-link-mail-warning
Open

milanmajchrak wants to merge 1 commit into
dtq-dev-93from
93/fe-share-link-mail-warning

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

References

No dtq-dev source. Pairs with the BE branch 93/be-error-responses, which adds emailSent to the share link response.

Description

When the share link e-mail cannot be sent, the share page now shows a warning instead of "sent successfully".

Instructions for Reviewers

List of changes in this PR:

  • WorkspaceitemActionsComponent.shareSubmission() shows a warning when the response has emailSent: false. The share page still opens with the link, so the user can copy it.
  • The share page gets emailSent in the URL. On false it says the e-mail could not be sent, instead of "You will also receive an email with this link".
  • Without the flag (an older BE) the success message stays as before.
  • New i18n keys submission.workflow.share-submission.email.not-sent and share.submission.page.share-link.message.end.not-sent in en and cs.
  • New specs in workspaceitem-actions.component.spec.ts and share-submission-page.component.spec.ts. The warning spec and the share page spec fail on the old code.

How to test:

  1. Run the BE from 93/be-error-responses without a working SMTP server.
  2. In MyDSpace, click Share submission on a workspace item.
  3. You see the warning and the share page with the link, without the e-mail promise. With working SMTP you see the old success message and text.
  • npm run test -- --include=src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts --include=src/app/share-submission/share-submission-page/share-submission-page.component.spec.ts

Codex review (gpt-6.2-sol, high), 2 rounds: 1 finding fixed (the share page still promised an e-mail that was not sent). The last round found nothing.

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

The share response now says whether the mail went out. On false the page shows a warning, not success, and the share page does not promise an e-mail.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant