Skip to content

[PURR][#2812]Display the Review tab and progress notice to user in publication submission process - #1930

Closed
kuang5 wants to merge 1 commit into
hubzero:2.4-mainfrom
kuang5:kuang_local_branch_09252026
Closed

kuang5 wants to merge 1 commit into
hubzero:2.4-mainfrom
kuang5:kuang_local_branch_09252026

Conversation

@kuang5

@kuang5 kuang5 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

PURR Ticket: https://purr.purdue.edu/support/ticket/2812

We saw a few users who prepare datasets submission stop at finishing the Notes section and they didn't click the Next button to enter the review page. One reason is that the Review tab doesn't display in the submission progress bar. We want the Review tab to display all the time on the publication submission process bar and display a notice message 'Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator.' in all the progress section before the Review step.

The code changes include adding the progress notice under both the version label and progress bar and allow the Review tab to display all the time in publication submission so that users are aware of them. Modified statusbar.php is going to be the PURR view and is put in doi template for view override.

Test steps:

  1. Start a file publication. You should see that notice message 'Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator.' shows below the version label and progress bar in sections including section including Content, Description, Authors, Extras, License, Tags, Citations, and Notes. You should also see the Review tab on the progress bar.
  2. Complete and submit the publication. Data curator marks one field such as content need to be changed and kicks the publication back to submitter. When submitter clicks make change button, he should see both the notice message 'Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator.' in each section of publication progress and the Review tab on progress bar.

Test is done on dev PURR and it works as expected.

@kuang5
kuang5 requested a review from nkissebe as a code owner September 25, 2026 18:45

@nkissebe nkissebe 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.

Thanks for picking this up. A few things before this can go in:

The UI change isn't in the PR. The diff only adds the language key. The always-visible Review tab and the notice that renders it (per the description, a doi-template override of statusbar.php) aren't included, and nothing in the repo references PLG_PROJECTS_PUBLICATIONS_PROGRESS_NOTICE. As-is, 2.4-main would gain an orphan string and none of the test steps can be reproduced from the repo. Please include the actual template/plugin change so it can be reviewed together with the string.

Fix the Review-tab guard in core rather than forking the statusbar template. The tab is hidden by a four-line guard in core/plugins/projects/publications/views/draft/tmpl/statusbar.php (around line 74):

if ($blockname == 'review' && ($blockId != $activenum)) { continue; }

Copying the whole statusbar into app/templates/doi/html/... duplicates ~80 lines of curation status/class logic that will drift the next time core touches it. Removing (or parameterising) that guard in core is safe: review.php already gates on curation('complete') (lines 16 and 64) and the submit handler re-checks completeness in publications.php (~line 2042), so jumping to Review early can't submit an incomplete draft. Keep only the notice markup/CSS in the template.

Inline notes on the string itself below.

PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_METADATA="Error registering the DOI metadata and issuing DOI."
PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_NAME_URL="Error registering the DOI name and dataset URL."
PLG_PROJECTS_PUBLICATIONS_ERROR_UPDATE_DOI="Failed to update DOI."
PLG_PROJECTS_PUBLICATIONS_PROGRESS_NOTICE="Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator."

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.

Wrong button name in the resubmit flow. For a curator-returned publication (state 7 / WORKED, which is test step 2 in the description), the Review page renders PLG_PROJECTS_PUBLICATIONS_RESUBMIT_DRAFT ("Re-submit draft to be published"), not "Submit draft" (see views/draft/tmpl/review.php ~line 289). So the notice would tell the user to look for a button that isn't there, which is the stall this PR is meant to fix. Either add a second key for the isWorked() case or make the wording generic (e.g. "click the submit button").

Site-specific wording in the shared core file. "Your dataset" and "an administrator" are PURR phrasing; the rest of this plugin says "publication". PURR already keeps this kind of override in app/bootstrap/site/language/overrides/en-GB.override.ini (e.g. PLG_PROJECTS_PUBLICATIONS_WHATS_NEXT_PENDING), which the translator merges over every loaded file. If a core key is wanted at all, give it generic wording here and put the PURR wording in the override.

PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_METADATA="Error registering the DOI metadata and issuing DOI."
PLG_PROJECTS_PUBLICATIONS_ERROR_REGISTER_NAME_URL="Error registering the DOI name and dataset URL."
PLG_PROJECTS_PUBLICATIONS_ERROR_UPDATE_DOI="Failed to update DOI."
PLG_PROJECTS_PUBLICATIONS_PROGRESS_NOTICE="Your dataset is not yet submitted! When you have filled each required field, open the Review tab, then click "Submit draft" to send your dataset to an administrator."

@nkissebe nkissebe Oct 7, 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.

Unescaped double quotes inside a double-quoted INI value. This only parses because Translator loads with INI_SCANNER_RAW; the translator's own post-processing (str_replace('\"', '"')) shows the supported convention is \". Any normal-mode parser (default parse_ini_file, external tooling, a future lint) will error on this line and drop the whole file. Please write click \"Submit draft\" or use single quotes.

Placement. This is an informational draft-flow message but it's been added inside the ; Errors block between ERROR_* keys. Move it next to PLG_PROJECTS_PUBLICATIONS_DRAFT_READY_TO_SUBMIT or the other draft-flow strings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry that I forgot to mention that the language change in this PR needs to be combined with the view changes in https://gitlab.hubzero.org/hub-purr/tpl_doi/-/merge_requests/17. All changes together implemented the functionality.

@nkissebe nkissebe 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.

Second pass, after finding the view this string serves: tpl_doi branch kuang_local_branch_doi_template_09252026, a full copy of core's draft/statusbar.php that differs from core in two generic ways: it drops the guard hiding the Review tab until you are on it, and it shows a "not submitted yet" notice. Neither is PURR-specific, and as a copy of a core view it will drift. So I've put both into core and left the template with styling only:

  • #1940 supersedes this PR (your commit carried, rework on top): the Review tab is always listed, the notice is shown for new and returned drafts (the returned case names the right button, "Re-submit draft to be published"), with generic strings in the draft-flow section.
  • tpl_doi branch pub-review-notice keeps PURR's red styling for the notice; no statusbar override needed. A merge request still needs opening: https://gitlab.hubzero.org/hub-purr/tpl_doi/-/merge_requests/new?merge_request%5Bsource_branch%5D=pub-review-notice
  • PURR's "dataset"/"administrator" wording is in the hub's app/bootstrap/site/language/overrides/en-GB.override.ini, where the other publications phrasing already lives.

@nkissebe

nkissebe commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Merged via #1940: your commit carried as-is on top of current 2.4-main, plus the rework described above (Review tab always listed in the draft status bar, a notice for unsubmitted and returned drafts with generic wording in core). PURR's styling is on tpl_doi branch pub-review-notice and its wording in the hub's language override file; nothing else is needed in the template.

@nkissebe nkissebe closed this Oct 7, 2026
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.

2 participants