Skip to content

Improvements for product/project template refactoring #296

Closed
@maxceem

Description

@maxceem

This issue has the final touch which we should do for refactoring product template and project templates to use Form model.

It's a follow up from this PR #290

  1. In this PR helper method has been created util.checkModel while in previous code this method has been defined several times:

    So we can reuse a new helper method in all these cases.

  2. At the moment we have two ways of defining forms for both ProductTemplates and ProjectTemplates: old way inside the template and new way using Form model.
    So both of fields are optional:

    image

    and

    image

    For ProductTemplate we should check in create/update endpoints that

    • either form or template field is defined, but not both together.

    For ProjectTemplate we should check in create/update endpoints that:

    • either scope or form field must be defined, but not both together
    • scope or priceConfig cannot be defined together (they can be both null though)
    • either phases or phaseConfig field must be defined, but not both together.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions