Skip to content

Commit

Permalink
docs(TaskList): Include taskFilterByVariable in the API Docs - (alpha…
Browse files Browse the repository at this point in the history
…5 release) (#2552)

* Include taskFilterByVariable in the API Docs

* Update task-search-request.mdx

Change the variable filter text

* Update task-search-request.mdx

Fix typo.

* style(formatting): little bitty grammatical fix

---------

Co-authored-by: Christina Ausley <[email protected]>
Co-authored-by: christinaausley <[email protected]>
  • Loading branch information
3 people authored Sep 12, 2023
1 parent d012248 commit 6fdf619
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 0 deletions.
56 changes: 56 additions & 0 deletions docs/apis-tools/tasklist-api-rest/schemas/enums/operator.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
id: operator
title: Operator
hide_table_of_contents: false
---

export const Bullet = () => (
<>
<span
style={{
fontWeight: "normal",
fontSize: ".5em",
color: "var(--ifm-color-secondary-darkest)",
}}
>
&nbsp;&nbsp;
</span>
</>
);

export const SpecifiedBy = (props) => (
<>
Specification
<a
className="link"
style={{ fontSize: "1.5em", paddingLeft: "4px" }}
target="_blank"
href={props.url}
title={"Specified by " + props.url}
>
</a>
</>
);

export const Badge = (props) => (
<>
<span class={"badge badge--" + props.class}>{props.text}</span>
</>
);

Filter task by variables operator.

```java
enum Operator {
eq
}
```

### Values

#### [<code style={{ fontWeight: 'normal' }}>Operator.<b>eq</b></code>](#)

> Equals
[`TaskVariables`](../models/task-variables.mdx) <Badge class="secondary" text="input"/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
id: task-variables
title: TaskVariables
hide_table_of_contents: false
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

export const Bullet = () => (
<>
<span
style={{
fontWeight: "normal",
fontSize: ".5em",
color: "var(--ifm-color-secondary-darkest)",
}}
>
&nbsp;&nbsp;
</span>
</>
);

export const SpecifiedBy = (props) => (
<>
Specification
<a
className="link"
style={{ fontSize: "1.5em", paddingLeft: "4px" }}
target="_blank"
href={props.url}
title={"Specified by " + props.url}
>
</a>
</>
);

export const Badge = (props) => (
<>
<span class={"badge badge--" + props.class}>{props.text}</span>
</>
);

Filter task by Variables

<Tabs groupId="schema" defaultValue="schema" values={
[
{label:'Schema',value: 'schema'},
{label:'Example value',value: 'example'}
]
}>
<TabItem value='schema'>

```graphql
{
"name": string,
"value": string,
"operator": Operator
}
```

</TabItem>

<TabItem value='example'>

```json
{
"name": "variableName",
"value": "variableValue",
"operator": "eq"
}
```

</TabItem>
</Tabs>

### Fields

#### [<code style={{ fontWeight: 'normal' }}>TaskVariables.<b>name</b></code>](#)<Bullet />`string` <Badge class="secondary" text="non-null"/>

> The name of the variable
#### [<code style={{ fontWeight: 'normal' }}>TaskVariables.<b>value</b></code>](#)<Bullet />`string` <Badge class="secondary" text="non-null"/>

> The value of the variable
#### [<code style={{ fontWeight: 'normal' }}>TaskVariables.<b>operator</b></code>](#)<Bullet />[`Operator`](../enums/operator.mdx) <Badge class="secondary" text="non-null"/> <Badge class="secondary" text="enum"/>

> Define the search operator to use for the variable
### Member of

[`TaskSearchRequest`](../requests/task-search-request.mdx) <Badge class="secondary" text="object"/>
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ TaskSearchRequest - query object to search tasks by provided params.
"pageSize": int,
"followUpDate": DateFilter,
"dueDate": DateFilter,
"taskVariables": [TaskVariables],
"sort": [TaskOrderBy],
"searchAfter": [string],
"searchAfterOrEqual": [string],
Expand Down Expand Up @@ -96,6 +97,13 @@ TaskSearchRequest - query object to search tasks by provided params.
"from": "2023-03-29T18:38:10.491Z",
"to": "2023-03-29T18:38:10.491Z"
},
"taskVariables": [
{
"name": "variable_name",
"value": "variable_value",
"operator": "eq"
}
],
"sort": [
{
"field": "completionTime",
Expand Down Expand Up @@ -156,6 +164,10 @@ TaskSearchRequest - query object to search tasks by provided params.

> Specifying a range of due dates for the tasks to search for.
#### [<code style={{ fontWeight: 'normal' }}>TaskSearchRequest.<b>taskVariables</b></code>](#)<Bullet />[`TaskVariables`](../models/task-variables.mdx) <Badge class="secondary" text="list"/>

> An array of filter clauses specifying the variables to filter for. If defined, the query returns only tasks to which all clauses apply. However, it's important to note that this filtering mechanism is designed to work exclusively with truncated variables. This means variables of a larger size are not compatible with this filter, and attempts to use them may result in inaccurate or incomplete query results.
#### [<code style={{ fontWeight: 'normal' }}>TaskSearchRequest.<b>sort</b></code>](#)<Bullet />[`TaskOrderBy`](../models/task-order-by.mdx) <Badge class="secondary" text="list"/>

> An array of objects specifying the fields to sort the results by.
Expand Down

0 comments on commit 6fdf619

Please sign in to comment.