Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Publication] Fix for auto-selecting Project in edit #9187

Merged
merged 4 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/publication/ajax/getData.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ function getData($db) : array
*/
function getProjectData($db, $user, $id) : array
{
$query = 'SELECT Title, Description, pr.Name as project, datePublication, '.
$query = 'SELECT Title, Description, ' .
'p.project as project, pr.Name as projectName, datePublication, '.
'journal, link, publishingStatus, DateProposed, '.
'pc.Name as LeadInvestigator, pc.Email as LeadInvestigatorEmail, '.
'PublicationStatusID, UserID, RejectedReason '.
Expand Down Expand Up @@ -199,6 +200,7 @@ function getProjectData($db, $user, $id) : array
'title' => $title,
'description' => $description,
'project' => $result['project'],
'projectName' => $result['projectName'],
'datePublication' => $datePublication,
'journal' => $journal,
'link' => $link,
Expand Down
3 changes: 2 additions & 1 deletion modules/publication/jsx/viewProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class ViewProject extends React.Component {
title: data.title,
description: data.description,
project: data.project,
projectName: data.projectName,
publishingStatus: data.publishingStatus,
datePublication: data.datePublication,
journal: data.journal,
Expand Down Expand Up @@ -304,7 +305,7 @@ class ViewProject extends React.Component {
<StaticElement
name="project"
label="Project"
text={this.state.formData.project}
text={this.state.formData.projectName}
/>
<StaticElement
name="publishingStatus"
Expand Down
Loading