Class BasicProjectFieldValueUpdater

Source
Expand description

Class for updating a single project's field values.

remarks

Created by ProjectFieldValueUpdaterFactory.create for each matching project configuration.

Constructors§

Source§

new BasicProjectFieldValueUpdater(
    context: PRLogusContext,
    projects: ProjectInOrgQueryResultElement[],
    orgConfig: OrganizationConfig,
    log: LogusLog | undefined,
): BasicProjectFieldValueUpdater

Constructor for BasicProjectFieldValueUpdater.

Properties§

§private readonly context: PRLogusContext
§private readonly log: LogusLog | undefined
§private readonly orgConfig: OrganizationConfig
§private readonly projects: ProjectInOrgQueryResultElement[]

Methods§

Source§

caseInsensiviteEqual(
    firstString: string | undefined,
    secondString: string,
): boolean

Compares two strings for equality, ignoring case and accents.

Source§

increment(
    fieldNameSelector: (s: OrganizationConfig) => string | undefined,
): Promise<void>

Increments the number field in the project.

Source§

updateDate(
    fieldNameSelector: (s: OrganizationConfig) => string | undefined,
    newFieldValue: string,
    condition?: (currentFieldVal: string) => boolean,
): Promise<void>

Updates the date field in the project.

Source§

updateField(
    fieldNameSelector: (s: OrganizationConfig) => string | undefined,
    action: (
        proj: ProjectInOrgQueryResultElement,
        item: { fieldValue: string | number | Date; itemId: string },
        fieldId: string,
    ) => Promise<void>,
): Promise<void>

Updates the specified field in the project.