diff --git a/docs/manual/service_catalog/operation.md b/docs/manual/service_catalog/operation.md index 8c781c7d4..c2864e158 100644 --- a/docs/manual/service_catalog/operation.md +++ b/docs/manual/service_catalog/operation.md @@ -62,60 +62,3 @@ flowchart LR **Default inventory ID** field is expecting an integer that correspond the the inventory ID in RHAAP/AWX. **Default credential IDs** field is expecting a comma separated list of integer that correspond existings credentials ID in RHAAP/AWX. - - -## Survey - -The survey of an operation can be edited to change the behavior of the generated form of a request. - -!!! note - - Surveys in Squest are actually surveys attached to each job templates in your RHAAP/AWX. - Squest can only disable the ones that you don't want to be filled by your end users. - Those fields, if declared as mandatory on RHAAP/AWX, will need to be filled anyway by the admin when approving a request. - -### Is customer field - -A **customer field** is a field that will be displayed into the end user survey. -By default, all fields are enabled when creating a new operation. - -!!! note - - If the field is set as **required** into the RHAAP/AWX job template survey config then the administrator - will have to fill it in any case during the review of the request. - -### Default value - - -When set, the default value is pre-filled into the final form. It takes precedence over the default value set in RHAAP/AWX job template survey config. - -Default value precedence: - -```mermaid -flowchart LR - RHAAP/AWX(Default from RHAAP/AWX) --> squest(Default from Squest value) --> User(User's input) --> Admin(Admin's input) -``` - -!!! note - - When used with a 'multiple select' or 'multiple select multiple' type of field, the value need to be a valid one from the RHAAP/AWX survey field options. - -**Jinja templating** - -Jinja templating can be used in the default value based on the current `{{ instance }}` and `{{ user }}` objects as context. -Examples can be retrieved in the [dedicated documentation section](../advanced/jinja.md). - -Full `instance` and `user `object definition can be retrieved through the [API documentation](../../administration/api.md). - -### Validators - -Field validators are python modules that can be added as plugin to perform a custom check on a form field. -See related [documentation here](../advanced/validators.md). - - -### Attribute definition - -Each field can be linked to an _Attribute definition_ from the resource tracking. This allows to automatically limit the field value to a [quota](../access.md#quota). -The available quota is shown in the form of the request so the end user know what he can still consume. - -![survey_quota](../../images/survey_quota.png) diff --git a/docs/manual/service_catalog/survey.md b/docs/manual/service_catalog/survey.md new file mode 100644 index 000000000..d3d2f8a42 --- /dev/null +++ b/docs/manual/service_catalog/survey.md @@ -0,0 +1,61 @@ +# Survey + +The survey of an operation in Squest is actually the one configured in the RHAAP/AWX job templates. + +Squest administrator can select which fields will be exposed to the end users when requesting a service or a day 2 operation. + +By default, the approval workflow is composed of 2 steps: + +- Customer form (fields noted as 'customer field') +- Admin form (All fields of the job template) + +If more steps are needed, you can create a dedicated [approval workflow](../administration/approval_workflow.md). + + +## Is customer field + +A **customer field** is a field that will be displayed into the end user survey. +By default, all fields are enabled when creating a new operation. + +Fields that are not **customer fields** can be filled by any users who have the **accept_request** permission. + +!!! note + + If the field is set as **required** into the RHAAP/AWX job template survey config then the administrator + will have to fill it in any case during the review of the request. + +## Default value + + +When set, the default value is pre-filled into the final form. It takes precedence over the default value set in RHAAP/AWX job template survey config. + +Default value precedence: + +```mermaid +flowchart LR + RHAAP/AWX(Default from RHAAP/AWX) --> squest(Default from Squest value) --> User(User's input) --> Admin(Admin's input) +``` + +!!! note + + When used with a 'multiple select' or 'multiple select multiple' type of field, the value need to be a valid one from the RHAAP/AWX survey field options. + +**Jinja templating** + +Jinja templating can be used in the default value based on the current `{{ instance }}` and `{{ user }}` objects as context. +Examples can be retrieved in the [dedicated documentation section](../advanced/jinja.md). + +Full `instance` and `user `object definition can be retrieved through the [API documentation](../../administration/api.md). + +## Validators + +Field validators are python modules that can be added as plugin to perform a custom check on a form field. +See related [documentation here](../advanced/validators.md). + + +## Attribute definition + +Each field can be linked to an _Attribute definition_ from the resource tracking. This allows to automatically limit the field value to a [quota](../access.md#quota). +The available quota is shown in the form of the request so the end user know what he can still consume. + +![survey_quota](../../images/survey_quota.png) diff --git a/mkdocs.yml b/mkdocs.yml index 5bbb1a61b..092dbef0c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -38,6 +38,7 @@ nav: - Concept: manual/service_catalog/concept.md - Service: manual/service_catalog/service.md - Operation: manual/service_catalog/operation.md + - Survey: manual/service_catalog/survey.md - Resource tracking: - Concept: manual/resource_tracking/concept.md - Attribute: manual/resource_tracking/attributes.md