bjira 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/field.js +13 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bjira",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "A simple jira CLI tool",
5
5
  "main": "src/index.js",
6
6
  "author": {
package/src/field.js CHANGED
@@ -181,15 +181,21 @@ class Field extends Command {
181
181
  };
182
182
  }
183
183
 
184
+ let value = await Ask.askList(`${fieldData.name}:`,
185
+ fieldData.allowedValues.map(value => ({
186
+ name: value.name,
187
+ value: {
188
+ id: value.id
189
+ }
190
+ })));
191
+
192
+ if (fieldData.schema.type === 'array') {
193
+ value = [value];
194
+ }
195
+
184
196
  return {
185
197
  key: fieldData.key,
186
- value: await Ask.askList(`${fieldData.name}:`,
187
- fieldData.allowedValues.map(value => ({
188
- name: value.name,
189
- value: {
190
- id: value.id
191
- }
192
- })))
198
+ value,
193
199
  };
194
200
  }
195
201
  };