Skip to content

[PURR][#2778]Update the organization setting in author profile#1884

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

[PURR][#2778]Update the organization setting in author profile#1884
kuang5 wants to merge 1 commit into
hubzero:2.4-mainfrom
kuang5:kuang_local_hub_05112026

Conversation

@kuang5
Copy link
Copy Markdown
Contributor

@kuang5 kuang5 commented May 11, 2026

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

  1. Empty organization might be acquired when using function getAuthorByOwnerId to get the contact person's information. In the function getAuthorByOwnerId, the organization property is set to the organization value from the PURR user profile, however, such organization might be empty.
  2. User reported an issue that the institution doesn't show up after it is entered and saved through author edit form occurred on production PURR. The issue has the same cause that the author information comes from the return of function getAuthorByOwnerId, which return the organization that is empty in the author's PURR user profile.
  3. Add information in the authors section in publication workflow to let users know they need to include department, institution and email if such author is going to be the contact.
  4. Add the department field on the form of Add a new author. It is going to be saved when author is added. The field supports the autocomplete that matched school or department is going to display in a list when user enters in the field.
  5. Change PLG_PROJECTS_PUBLICATIONS_PUBLICATION_ERROR_CONTACT_ORGANIZATION_MISSING to PLG_PROJECTS_PUBLICATIONS_PUBLICATION_ERROR_CONTACT_INSTITUTION_MISSING in plugins/projects/publications/publications.php.
  6. Add department field to the edit author form on admin interface. On publication component admin interface, the ORCID and organization in PURR user's profile are going to display on the author edit form only when they are empty in the author table and available in the user's profile.

Code changes

  1. Update the function getAuthorByOwnerId so that the organization will be set to it in the PURR user's profile only when it is empty in the author record and it is available in the PURR user profile. The same process is applied on the ORCID and organization ID.
  2. Update the author edit task in publication component to display the organization and ORCID from the user's PURR profile only when they are empty in author's record.
  3. Add the department text field to the author edit form on publication component admin interface.
  4. Add hint at the author section in publication workflow to remind user to set the department, organization and email if the author is going to be selected as the contact.
  5. Update the macro PLG_PROJECTS_PUBLICATIONS_PUBLICATION_ERROR_CONTACT_ORGANIZATION_MISSING to PLG_PROJECTS_PUBLICATIONS_PUBLICATION_ERROR_CONTACT_INSTITUTION_MISSING in plg_project_publication controller.
  6. Add the department text field to the form of adding a new author. Make the field support the autocomplete function.

Testing steps:

  1. Empty the organization and save the changes in your PURR user profile. Create a publication and add you as the author. It is expected that a message "Edit the author to set the department, organization and email if the author is going to be selected as the contact in the review stage" displays at the bottom of the author list.
  2. Fill in the department, organization and email for you by editing it in the author section. After saving the changes, click the edit button again to open the edit form to see that the organization exists in the text field.
  3. Click "select an author" -> "Add a new author", you see that the department field display on the add a new author form. Fill in the name, email. When you enter the department, it automatically prompts a list of matched departments for you to choose. Leave the organization field empty for this new author.
  4. On the final step data review, select the new author as contact, select agree to terms and then click the submit button. You are expected to see alert message "The contact is required to include the affiliated institution". Edit the author to add the organization.
  5. Then finally click the submit button. The expected result is that the publication can be successfully submitted. The organization of the author is what you set when editing it, even though the organization is empty in your PURR profile.
  6. On publication component admin interface, you are expected to see that department display on the author edit form. The department, organization and ORCID are the same as those that are set through the publication workflow.

I tested them on dev PURR and they all work as expected.

Jerry

@kuang5 kuang5 requested a review from nkissebe as a code owner May 11, 2026 15:26
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