Site:QMDashboard: Difference between revisions

Meryam Sahin (talk | contribs)
No edit summary
Meryam Sahin (talk | contribs)
No edit summary
Line 46: Line 46:
}}
}}
</div>
</div>
{{#vardefine:ExpiringSoon|
    {{#neowiki_query:
    {
        "conditions": [
            {
                "property": "Document Control.Valid until",
                "operator": ">",
                "value": "{{#time:Y-m-d}}"
            },
            {
                "property": "Document Control.Valid until",
                "operator": "<=",
                "value": "{{#time:Y-m-d|+14 days}}"
            }
        ]
    }
    |format="count"
    }}
}}
{{#vardefine:NoOwner|
    {{#neowiki_query:
    {
        "conditions": [
            {
                "property": "Document Control.Owner",
                "operator": "IS NULL",
                "value": ""
            }
        ]
    }
    |format="count"
    }}
}}
{{#vardefine:NoExpiration|
    {{#neowiki_query:
    {
        "conditions": [
            {
                "property": "Document Control.Valid until",
                "operator": "IS NULL",
                "value": ""
            }
        ]
    }
    |format="count"
    }}
}}
{{#vardefine:Expired|
    {{#neowiki_query:
    {
        "conditions": [
            {
                "property": "Document Control.Valid until",
                "operator": "<=",
                "value": "{{#time:Y-m-d}}"
            }
        ]
    }
    |format="count"
    }}
}}
{{#vardefine:FirstDrafts|
    {{#neowiki_query:
    {
        "conditions": [
            {
                "property": "qm/state_raw",
                "operator": "=",
                "value": "first-unstable"
            }
        ],
        "hasSubjects": [ "Document Control" ]
    }
    |format="count"
    }}
}}
{| style="width:100%"
|-
| <kpitile value="{{#var:ExpiringSoon}}" max="1" label="Expiring soon" color-thresholds="0:green|10:red" />
| <kpitile value="{{#var:NoOwner}}" max="1" label="Without owner" color-thresholds="0:green|1:red" />
| <kpitile value="{{#var:NoExpiration}}" max="1" label="Without validity date" color-thresholds="0:green|1:red" />
| <kpitile value="{{#var:FirstDrafts}}" max="1" label="Without approval" color-thresholds="0:green|10:red" />
| <kpitile value="{{#var:Expired}}" max="1" label="Expired pages" color-thresholds="0:green|1:red"/>
|}
<neowiki_report format="grid">
    {
        "properties": {
            "Document Control.Document ID": "Document ID",
            "Document Control.Owner": "Document owner",
            "qm/state": "Approval state",
            "qm/has_draft": "Has draft",
            "read_confirmation/pending_count": "Pending read confirmations",
            "workflows/count": "Number of running workflows",
            "Document Control.Valid until": "Valid until"
        },
        "conditions": [],
        "sort": [ {
            "property": "name",
            "direction": "ASC"
        } ],
        "hasSubjects": [ "Document Control" ],
        "mainLabel": "Document name"
    }
</neowiki_report>

Revision as of 11:08, 17 August 2026

{{#neowiki_ask:

  Schema:Document control
| ?Document control.Document ID = Document ID
| ?Document control.Document type = Document type
| ?Document control.Owner = Document owner
| ?qm_state = Approval state
| ?qm_has_draft = Has draft
| ?read_confirmation/pending_count = Pending read confirmations
| ?workflows/count = Number of running workflows
| ?Document control.Valid until = Valid until
| format = grid
| mainlabel = Document name
| sort = Document control.Valid until
| order = asc

}}