From e4e5e92a31c9170959854971dfd01689255cbcaf Mon Sep 17 00:00:00 2001 From: Vikas Agarwal Date: Mon, 14 Aug 2017 19:57:48 +0530 Subject: [PATCH] =?UTF-8?q?Github=20issue#1037,=20Project=20spec=20informa?= =?UTF-8?q?tion=20is=20not=20saved=20when=20changing=20project=20types=20?= =?UTF-8?q?=E2=80=94=20Added=20notes=20to=20restored=20fields=20list?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/projects/create/components/ProjectWizard.jsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/projects/create/components/ProjectWizard.jsx b/src/projects/create/components/ProjectWizard.jsx index e8f3fdc90..b1b4c7709 100644 --- a/src/projects/create/components/ProjectWizard.jsx +++ b/src/projects/create/components/ProjectWizard.jsx @@ -216,6 +216,18 @@ class ProjectWizard extends Component { if (usersField && users) { appDefinitionQuery.users = users } + const notes = _.get(this.state.dirtyProject, 'details.appDefinition.notes') + // finds the notes field from the target product template + const notesField = getProjectCreationTemplateField( + updatedProduct, + 'appDefinition', + 'notes', + 'details.appDefinition.notes' + ) + // if notes was already entered and updated product template has the field, restore it + if (notesField && notes) { + appDefinitionQuery.notes = notes + } detailsQuery.appDefinition = appDefinitionQuery }