Opqo provides functionality for work management users to mark tasks as complete.  In the default configuration, there are two options for completion:

  1. Completed: Changes the task status to COMP, and records "Completed" as the status memo
  2. Not Done: Changes the task status to COMP, and records "Not Done" as the status memo




These default options were chosen to be compatible with standard Maximo configurations, however these task completion options are configurable to match more specific needs.


The work status change options are specified by the taskCompletionOptions property in the general section of the STAUTOSCRIPT.STAMCONFIG automation script in the Maximo environment.  The taskCompletionOptions property contains a list of the completion options to display.



Note: For more information on Opqo configuration and the role and contents of the STAUTOSCRIPT.STAMCONFIG script, see the Configuration Overview article.



There are two types of task completion options that can be configured:

  1. Task completion options that change the task status
  2. Task completion options that set one or more task attributes.



Task status completion options

Task status completion options record task completion by setting the status of the task.


Note: The configured status options must be valid Maximo statuses and status changes, as they are subject to Maximo business rules.  If they are not, Maximo will reject the task completion transactions.


Note: Typically, when using task status completion options, the tasks should be marked as not inheriting status changes from the work order (Inherit Status Changes? should be unchecked).  If they are not, they may incur undesired status changes when the work order status is changed.


These completion options have the following properties:


PropertyTypeDescription
titleStringThe title of the option to display.

This property is optional. If it is not provided, the status will be displayed.
statusStringThe Maximo status to change the task to when this option is selected.

This property is required.
revertToStatusStringThe Maximo status to change the task to if the option is reset/undone.

If specified, this should be a synonym of INPRG.

This value is optional, and is only applicable if status is a synonym of INPRG.  The default value is INPRG.
icon

or 

faIconNumber
StringThe icon displayed in the tasks list when the task is completed with this option.

Only one of icon or faIconNumber should be specified, with faIconNumber being used if both are present.

icon is one of these values, which are commonly used:
  • "completed"
  • "unable" 
  • "notdone"
  • "other"

faIconNumber is a String containing the hex unicode value of a Font Awesome Icon.  For example, "f00c" for a check mark.
iconColorStringContains the color of the icon displayed in the tasks list when the task is completed with this option.

This can be one of the standard Opqo colors, or a hex color string:
  • green
  • blue
  • yellow
  • orange
  • purple
  • black
  • grey


This is optional.  If it is not provided, if icon is specified as "completed", the completion icon will be displayed as green, otherwise the icon will be displayed as grey.
isDefaultbooleanAffects the visual display of the option, as presented to the user.

If true, the option is shown as a more prominent option than when false.

Generally, the most common/expected option will have this property set to true, with the others set to false.

This is optional.  The default value is false.




Example: Custom reversible task completion statuses


This example marks task completion by changing the status of the task to WCOMP, NOTDONE or NOACCESS.  These are custom statuses which are synonyms or INPRG.  This allows the user to revert/undo task completion within Opqo, which will set the task status back to INPRG.


The configuration for these task completion options is as follows:


appConfig = {
  "general": {
    ...
    "taskCompletionOptions": [
      {
        "title": "Pass",
        "status": "WCOMP",
        "icon": "completed",
        "isDefault": true,
      },
      {
        "title": "Not Done",
        "status": "NOTDONE",
        "icon": "notdone",
      },
      {
        "title": "No Access",
        "status": "NOACCESS",
        "faIconNumber": "f00d",
        "iconColor": "orange",
      }
    ]
  }
}




Task attribute completion options

Task attribute completion options record task completion by setting one or more attributes on the task.


These completion options have the following properties:


PropertyTypeDescription
titleStringThe title of the option to display.

This property is optional. If it is not provided, the status will be displayed.
attributeNameStringThe name of the Maximo task attribute to set.

This property is required.
attributeValueAppropriate for the attribute being setThe value to set the Maximo task attribute to when this option is selected.

The type of this value must be appropriate for the Maximo task attribute.

This property is required.
additionalAttributeValuesObjectDefines additional task attribute properties that will be set when this option is selected.

This is useful when task completion options set different task attributes (such as separate YORN fields), allowing the other attributes to be cleared/reset.

The property names must match valid Maximo task attributes, and the property values must be appropriate for the value being set.

This property is optional.
isReversiblebooleanIf true, allows the user to reset/undo this completion option.

This property is optional. The default value is true.
revertToValueAppropriate for the attribute being setThe value to set the task attribute to if the option is reset/undone.

This property is optional. If attributeValue is boolean, this will default to the inverse of attributeValue, otherwise the default value is null.
icon

or 

faIconNumber
StringThe icon displayed in the tasks list when the task is completed with this option.

Only one of icon or faIconNumber should be specified, with faIconNumber being used if both are present.

icon is one of these values, which are commonly used:
  • "completed"
  • "unable" 
  • "notdone"
  • "other"
faIconNumber is a String containing the hex unicode value of a Font Awesome Icon.  For example, "f00c" for a check mark.
iconColorStringContains the color of the icon displayed in the tasks list when the task is completed with this option.

This can be one of the standard Opqo colors, or a hex color string:
  • green
  • blue
  • yellow
  • orange
  • purple
  • black
  • grey

This is optional.  If it is not provided, if icon is specified as "completed", the completion icon will be displayed as green, otherwise the icon will be displayed as grey.
isDefaultbooleanAffects the visual display of the option, as presented to the user.

If true, the option is shown as a more prominent option than when false.

Generally, the most common/expected option will have this property set to true, with the others set to false.

This is optional.  The default value is false.



Example: Task completion checkboxes


This example marks task completion by setting one of three task completion checkboxes.  These checkboxes are custom YORN task attributes for Pass (ST_TASKPASS), Fail (ST_TASKFAIL) and N/A (ST_TASK_NA).



As this involves multiple fields, when one option is selected, the remaining options are cleared via  additionalAttributeValues.


The configuration for these task completion options is as follows:


appConfig = {
  "general": {
    ...
    "taskCompletionOptions": [
      {
        "title": "Pass",
        "attributeName": "st_taskpass",
        "attributeValue": true,
        "additionalAttributeValues": {
            "st_taskfail": false,
            "st_taskna": false
        },
        "icon": "completed",
        "isDefault": true,
      },
      {
        "title": "Fail",
        "attributeName": "st_taskfail",
        "attributeValue": true,
        "additionalAttributeValues": {
            "st_taskpass": false,
            "st_taskna": false
        },
        "faIconNumber": "f00d",
        "iconColor": "orange",
      },
      {
        "title": "N/A",
        "attributeName": "st_taskna",
        "attributeValue": true,
        "additionalAttributeValues": {
            "st_taskpass": false,
            "st_taskfail": false
        },
        "faIconNumber": "e404",
        "iconColor": "grey",
      }
    ]
  }
}