Feature - APIs dont pull the status of an item

when you use the view method on an item it does not bring the status (dynamic status) of the item

https://demo-e2.eramba.org/securityServices/view/24.json

gives you back the following which does not include the dynamic status array

{
  "success": true,
  "data": {
    "RiskException": {
      "id": "1",
      "title": "Cant control XERO SLA",
      "description": "Although contracts are in place that determine SLAs with XERO if we loss the service or data we would not be able to recover easily and those contracts would not sustain losses.",
      "expiration": "2018-07-26",
      "expired": "1",
      "closure_date_toggle": true,
      "closure_date": null,
      "status": "1",
      "workflow_owner_id": null,
      "workflow_status": "0",
      "created": "2018-01-03 09:18:31",
      "modified": "2020-11-23 01:08:42",
      "edited": null,
      "deleted": "0",
      "deleted_date": null
    },
    "Tag": [],
    "CustomFieldValue": [],
    "Risk": [],
    "ThirdPartyRisk": [],
    "BusinessContinuity": [
      {
        "id": "1",
        "title": "XERO unavailability affect accounting and invoicing",
        "impact": "",
        "threats": "",
        "vulnerabilities": "Service Unavailability due external factors",
        "description": "",
        "residual_score": "100",
        "risk_score": "18",
        "risk_score_formula": "(1 * 3) x (5 + 1) = 18",
        "residual_risk": "18",
        "residual_risk_formula": "(3 * 1) x (5 + 1) = 18",
        "review": "2018-09-28",
        "expired": "1",
        "exceptions_issues": "1",
        "controls_issues": "0",
        "control_in_design": "0",
        "expired_reviews": "1",
        "risk_above_appetite": "1",
        "plans_issues": "0",
        "risk_mitigation_strategy_id": "1",
        "workflow_owner_id": null,
        "workflow_status": "0",
        "created": "2018-01-03 09:18:48",
        "modified": "2019-01-11 14:07:32",
        "edited": null,
        "deleted": "1",
        "deleted_date": "2019-01-11 14:07:32",
        "BusinessContinuitiesRiskException": {
          "id": "9",
          "business_continuity_id": "1",
          "risk_exception_id": "1"
        }
      }
    ],
    "Requester": [
      {
        "id": "User-2",
        "name": "Goran",
        "surname": "Galic",
        "email": "test@eramba.org",
        "login": "goran.galic",
        "password": "********",
        "language": "eng",
        "status": "1",
        "blocked": "0",
        "local_account": "1",
        "api_allow": "0",
        "default_password": "0",
        "account_ready": "1",
        "ldap_sync": "0",
        "ldap_synchronization_id": null,
        "created": "2018-01-02 12:33:37",
        "modified": "2018-01-02 12:33:37",
        "edited": null,
        "full_name": "Goran Galic",
        "full_name_with_type": "Goran Galic (User)",
        "UserFieldsUser": {
          "id": "65",
          "model": "RiskException",
          "foreign_key": "1",
          "field": "Requester",
          "user_id": "2",
          "created": "2018-03-21 15:55:55",
          "modified": "2018-03-21 15:55:55"
        }
      }
    ]
  }
}

github: https://github.com/eramba/eramba_v2/issues/2824
int ref: https://eramba.zendesk.com/agent/tickets/10943

ok - it was a quick fix which will be part of Release e2.20.4 … the json view method now shows for every item an array with all the possible status on that section an which one is active (1) or not (0) … if they are all 0 then it means the item is “OK” (the default green status) … just look at the “value” element

    "DynamicStatusValue": [
        {
            "id": "9578",
            "dynamic_status_id": "42",
            "model": "RiskException",
            "foreign_key": "5",
            "value": "0",
            "created": "2020-03-16 17:18:06",
            "modified": "2020-11-25 14:56:07",
            "DynamicStatus": {
                "id": "42",
                "name": "Expired",
                "description": null,
                "color": "#FF9800",
                "status": "1"
            }
        },
        {
            "id": "11499",
            "dynamic_status_id": "211",
            "model": "RiskException",
            "foreign_key": "5",
            "value": "0",
            "created": "2020-05-30 10:54:21",
            "modified": "2020-05-30 10:54:21",
            "DynamicStatus": {
                "id": "211",
                "name": "Completed",
                "description": null,
                "color": "#4CAF50",
                "status": "2"
            }
        }
    ]