Skip to content

Commit

Permalink
Fix JIRA integration priority field
Browse files Browse the repository at this point in the history
  • Loading branch information
dacoaster committed Feb 5, 2024
1 parent 24d47b4 commit 444408c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
54 changes: 52 additions & 2 deletions src/components/jira/JiraAddIssueForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
:light="!$vuetify.theme.dark"
:vuetify="$vuetify"
:placeholder="$t('message.insert_note')"
ref="newIssue.fields[item.key]"
:toolbar="[
'headings',
'|',
Expand Down Expand Up @@ -171,7 +170,7 @@
<v-select
dense
outlined
placeholder="Select a Item"
placeholder="Select an Item"
:items="item.allowedValues"
item-value="id"
item-text="value"
Expand All @@ -196,7 +195,15 @@
{{ item.name }}
</div>
<v-row class="mx-1 mb-1" justify="start">
<div
v-if="item.allowedValues.length < 1"
class="subtitle-3 label-text mt-3"
:style="{ color: currentTheme.secondary }"
>
{{ $t("caption.no_values_found") }}
</div>
<v-checkbox
v-else
v-for="(arrayItem, index) in item.allowedValues"
:key="index"
light
Expand Down Expand Up @@ -260,6 +267,49 @@
</template>
</v-autocomplete>
</div>
<div v-else-if="item.schema.type === 'priority'">
<div
class="subtitle-2 label-text"
:style="{ color: currentTheme.secondary }"
>
{{ item.name }}
</div>
<v-select
dense
outlined
placeholder="Select an Item"
:items="item.allowedValues"
item-value="id"
item-text="name"
v-model="newIssue.fields[item.key]"
:required="item.required"
>
<template v-slot:selection="{ attr, on, item }">
<div class="user-item" v-bind="attr" v-on="on">
<v-avatar size="20">
<img
:src="item.iconUrl"
width="24"
alt="avatar"
/>
</v-avatar>
{{ item.name }}
</div>
</template>
<template v-slot:item="{ item }">
<div class="user-item">
<v-avatar size="24">
<img
:src="item.iconUrl"
width="24"
alt="avatar"
/>
</v-avatar>
{{ item.name }}
</div>
</template>
</v-select>
</div>
<div v-else-if="item.schema.type === 'issuelink'">
<div
class="subtitle-2 label-text"
Expand Down
5 changes: 5 additions & 0 deletions src/integrations/JiraIntegrationHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ export default {
id: "",
};
returnResponse.blankIssue.fields[item.key] = parent;
} else if (item.key === "priority") {
const priority = {
id: item.defaultValue.id || "",
};
returnResponse.blankIssue.fields[item.key] = priority;
} else if (item.schema.type === "array") {
returnResponse.blankIssue.fields[item.key] = [];
} else {
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"caption": {
"no_values_found": "No values found",
"ai_assist": "AI assist",
"filename": "File name",
"custom_oauth_connections": "Custom OAuth Connections",
Expand Down

0 comments on commit 444408c

Please sign in to comment.