Skip to content

Commit b8b4b97

Browse files
authored
validations for min and max values of queryworkitems task (#5762)
1 parent 174eb0e commit b8b4b97

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

Tasks/QueryWorkItems/Strings/resources.resjson/en-US/resources.resjson

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"loc.helpMarkDown": "[More Information](https://go.microsoft.com/fwlink/?linkid=850348)",
44
"loc.description": "Executes a work item query and checks for the number of items returned.",
55
"loc.instanceNameFormat": "Query Work Items",
6+
"loc.group.displayName.advanced": "Advanced",
67
"loc.input.label.queryId": "Query",
78
"loc.input.help.queryId": "Select a saved work query to execute.",
89
"loc.input.label.maxThreshold": "Maximum Threshold",
910
"loc.input.help.maxThreshold": "The maximum number of matching workitems from the query.",
1011
"loc.input.label.minThreshold": "Minimum Threshold",
1112
"loc.input.help.minThreshold": "The minimum number of matching workitems from the query."
12-
}
13+
}

Tasks/QueryWorkItems/task.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@
1616
"version": {
1717
"Major": 0,
1818
"Minor": 0,
19-
"Patch": 1
19+
"Patch": 2
2020
},
2121
"instanceNameFormat": "Query Work Items",
22-
"groups": [],
22+
"groups": [
23+
{
24+
"name": "advanced",
25+
"displayName": "Advanced",
26+
"isExpanded": false
27+
}
28+
],
2329
"inputs": [
2430
{
2531
"name": "queryId",
@@ -35,6 +41,9 @@
3541
"label": "Maximum Threshold",
3642
"defaultValue": "0",
3743
"required": "true",
44+
"properties": {
45+
"isNonNegativeNumber": "true"
46+
},
3847
"helpMarkDown": "The maximum number of matching workitems from the query."
3948
},
4049
{
@@ -43,6 +52,10 @@
4352
"label": "Minimum Threshold",
4453
"defaultValue": "0",
4554
"required": "true",
55+
"properties": {
56+
"isNonNegativeNumber": "true"
57+
},
58+
"groupName": "advanced",
4659
"helpMarkDown": "The minimum number of matching workitems from the query."
4760
}
4861
],
@@ -60,4 +73,4 @@
6073
}
6174
}
6275
}
63-
}
76+
}

Tasks/QueryWorkItems/task.loc.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"description": "ms-resource:loc.description",
66
"author": "Microsoft Corporation",
77
"helpMarkDown": "ms-resource:loc.helpMarkDown",
8-
"category": "Deploy",
8+
"category": "Utility",
9+
"preview": true,
910
"visibility": [
1011
"Release"
1112
],
@@ -15,10 +16,16 @@
1516
"version": {
1617
"Major": 0,
1718
"Minor": 0,
18-
"Patch": 1
19+
"Patch": 2
1920
},
2021
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
21-
"groups": [],
22+
"groups": [
23+
{
24+
"name": "advanced",
25+
"displayName": "ms-resource:loc.group.displayName.advanced",
26+
"isExpanded": false
27+
}
28+
],
2229
"inputs": [
2330
{
2431
"name": "queryId",
@@ -34,6 +41,9 @@
3441
"label": "ms-resource:loc.input.label.maxThreshold",
3542
"defaultValue": "0",
3643
"required": "true",
44+
"properties": {
45+
"isNonNegativeNumber": "true"
46+
},
3747
"helpMarkDown": "ms-resource:loc.input.help.maxThreshold"
3848
},
3949
{
@@ -42,6 +52,10 @@
4252
"label": "ms-resource:loc.input.label.minThreshold",
4353
"defaultValue": "0",
4454
"required": "true",
55+
"properties": {
56+
"isNonNegativeNumber": "true"
57+
},
58+
"groupName": "advanced",
4559
"helpMarkDown": "ms-resource:loc.input.help.minThreshold"
4660
}
4761
],
@@ -58,4 +72,4 @@
5872
}
5973
}
6074
}
61-
}
75+
}

0 commit comments

Comments
 (0)