(
+
+
+ {
+ const selectedValue = values.at(-1) ?? "";
+ field.onChange(selectedValue);
+ }}
+ defaultValue={field.value ? [field.value] : []}
+ placeholder={
+ isFetchingIssueTypes
+ ? "Loading issue types..."
+ : "Select an issue type"
+ }
+ searchable={true}
+ emptyIndicator="No issue types found."
+ disabled={isFetchingIssueTypes}
+ hideSelectAll={true}
+ maxCount={1}
+ closeOnSelect={true}
+ resetOnDefaultValueChange={true}
+ />
+
+
+ )}
+ />
+ )}
+
{/* No integrations or none connected message */}
{!isFetchingIntegrations &&
(integrations.length === 0 || !hasConnectedIntegration) ? (
@@ -282,6 +398,7 @@ export const SendToJiraModal = ({
!form.formState.isValid ||
form.formState.isSubmitting ||
isFetchingIntegrations ||
+ isFetchingIssueTypes ||
integrations.length === 0 ||
!hasConnectedIntegration
}
diff --git a/ui/types/integrations.ts b/ui/types/integrations.ts
index 4f579847e3..63b1e37bff 100644
--- a/ui/types/integrations.ts
+++ b/ui/types/integrations.ts
@@ -29,7 +29,7 @@ export interface IntegrationProps {
// Jira specific configuration
domain?: string;
projects?: { [key: string]: string };
- issue_types?: string[];
+ issue_types?: { [key: string]: string[] };
[key: string]: unknown;
};
url?: string;