Skip to content

Commit d715634

Browse files
Fix assignee selecting issue
1 parent 81f70a6 commit d715634

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/renderer/components/dashboardPage/issues/form/schemas/dynamicSelect.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ export default {
5858
else {
5959
service.getAutocompletion({ url: `${this.field.autoCompleteUrl}${value}` })
6060
.then(res => {
61-
if (res.length > 1) this.$emit('input', {})
62-
else this.$emit('input', res[0])
61+
if (res.length < 1) return this.$emit('input', {})
62+
const user = res.find(u => u.displayName === value || u.name === value)
63+
this.$emit('input', user || res[0])
6364
})
6465
}
6566
}

0 commit comments

Comments
 (0)