Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Omgjøring til overordnet prosjekt resetter TemplateParameters #1532 #1543

Merged
merged 1 commit into from
Jun 19, 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { IProjectSetupData } from 'projectSetup'
import { SPDataAdapter } from '../../../data'
import { BaseTask, BaseTaskError, IBaseTaskParams } from '../@BaseTask'
import { OnProgressCallbackFunction } from '../types'
import _ from 'lodash'

/**
* Setup project information task handles the following tasks:
Expand Down Expand Up @@ -83,10 +84,13 @@ export class SetupProjectInformation extends BaseTask {
'AlignCenter'
)
const ideaDataProperties = await this._getIdeaDataProperties()
const properties = this._createPropertiesItem(this.params, {
let properties = this._createPropertiesItem(this.params, {
...ideaDataProperties,
TemplateParameters: JSON.stringify(this._templateParameters)
})
if(this.params.properties.skipUpdateTemplateParameters) {
properties = _.omit(properties, 'TemplateParameters')
}
const propertyItems = await list.items()
const propertyItem = list.items.getById(1)
if (propertyItems.length > 0) await propertyItem.update(properties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export interface IProjectSetupProperties {
* `title` and `subText`.
*/
progressDialogContentProps?: IDialogContentProps

/**
* Skip updating template parameters fields on the project list item.
*/
skipUpdateTemplateParameters?: boolean
}

export interface IProjectSetupData extends IProjectSetupDialogState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const ProjectSetupCustomAction: Record<string, any> = {
forceTemplate: 'Overordnet mal',
progressDialogContentProps: {
title: 'Setter opp overordnet prosjekt'
}
},
skipUpdateTemplateParameters: true
})
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './CreateParentDialog'
Loading