Skip to content

Commit e4e5e92

Browse files
author
Vikas Agarwal
committed
Github issue#1037, Project spec information is not saved when changing project types
— Added notes to restored fields list
1 parent 2d42d35 commit e4e5e92

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/projects/create/components/ProjectWizard.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,18 @@ class ProjectWizard extends Component {
216216
if (usersField && users) {
217217
appDefinitionQuery.users = users
218218
}
219+
const notes = _.get(this.state.dirtyProject, 'details.appDefinition.notes')
220+
// finds the notes field from the target product template
221+
const notesField = getProjectCreationTemplateField(
222+
updatedProduct,
223+
'appDefinition',
224+
'notes',
225+
'details.appDefinition.notes'
226+
)
227+
// if notes was already entered and updated product template has the field, restore it
228+
if (notesField && notes) {
229+
appDefinitionQuery.notes = notes
230+
}
219231
detailsQuery.appDefinition = appDefinitionQuery
220232
}
221233

0 commit comments

Comments
 (0)