Promote runway-silo to preview (#2385)
* fix: import user bug (#2381) * fix: linear redirect URL and translation * fix: asana empty description span value * fix: asana no custom field issue * fix: translations --------- Co-authored-by: Saurabh Kumar <[email protected]> Co-authored-by: Saurabhkmr98 <[email protected]>
This commit is contained in:
co-authored by
Saurabh Kumar
Saurabhkmr98
parent
7a86e44d20
commit
f7fd4398b2
@@ -143,14 +143,17 @@ export async function pullCustomFields(client: AsanaService, projectGid: string)
|
||||
limit: DEFAULT_PAGINATION_LIMIT,
|
||||
offset: "",
|
||||
};
|
||||
|
||||
do {
|
||||
const response = await client.getProjectCustomFieldSettings(projectGid, pagination);
|
||||
customFields.push(...response.data);
|
||||
pagination.offset = response._response.next_page?.offset || "";
|
||||
} while (pagination.offset);
|
||||
|
||||
return customFields;
|
||||
try {
|
||||
do {
|
||||
const response = await client.getProjectCustomFieldSettings(projectGid, pagination);
|
||||
customFields.push(...response.data);
|
||||
pagination.offset = response._response.next_page?.offset || "";
|
||||
} while (pagination.offset);
|
||||
} catch (error: any) {
|
||||
console.log("error while fetching custom fields from asana", error?.message);
|
||||
} finally {
|
||||
return customFields;
|
||||
}
|
||||
}
|
||||
|
||||
export async function pullAttachments(
|
||||
|
||||
@@ -82,7 +82,7 @@ export const transformTask = (
|
||||
attachments: targetAttachments as ExIssueAttachment[], // TODO: Fix this type
|
||||
state: targetState ? targetState.id : "",
|
||||
priority: targetPriority,
|
||||
description_html: !task.html_notes || task.html_notes == "" ? "<p></p>" : task.html_notes,
|
||||
description_html: !task.html_notes || task.html_notes == "<body></body>" ? "<p></p>" : task.html_notes,
|
||||
start_date: getFormattedDate(task.start_on),
|
||||
target_date: getFormattedDate(task.due_on),
|
||||
created_at: task.created_at,
|
||||
|
||||
@@ -66,7 +66,7 @@ export const PersonalAccessTokenAuth: FC = observer(() => {
|
||||
className="text-custom-primary-100 hover:underline"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Asana Developer Settings.
|
||||
Asana Security Settings.
|
||||
</a>
|
||||
</>
|
||||
),
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { FC, useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import useSWR from "swr";
|
||||
// ui
|
||||
// silo
|
||||
import { AsanaConfig, AsanaSection } from "@plane/etl/asana";
|
||||
import { E_JOB_STATUS, E_IMPORTER_KEYS } from "@plane/etl/core";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { TImportJob } from "@plane/types";
|
||||
import { Button, Loader } from "@plane/ui";
|
||||
// plane web components
|
||||
@@ -14,9 +16,8 @@ import { AddSeatsAlertBanner, SkipUserImport, StepperNavigation } from "@/plane-
|
||||
import { useAsanaImporter, useWorkspaceSubscription } from "@/plane-web/hooks/store";
|
||||
// plane web types
|
||||
import { E_IMPORTER_STEPS } from "@/plane-web/types/importers/asana";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
|
||||
export const SummaryRoot: FC = () => {
|
||||
export const SummaryRoot: FC = observer(() => {
|
||||
// hooks
|
||||
const {
|
||||
workspace,
|
||||
@@ -181,4 +182,4 @@ export const SummaryRoot: FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
@@ -67,7 +67,7 @@ export const PersonalAccessTokenAuth: FC = observer(() => {
|
||||
onChange: (e) => handleFormData("personalAccessToken", e.target.value),
|
||||
description: (
|
||||
<>
|
||||
{t("importers.token_helper")}
|
||||
{t("importers.token_helper")}{" "}
|
||||
<a
|
||||
tabIndex={-1}
|
||||
href="https://id.atlassian.com/manage-profile/security/api-tokens"
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
import { FC, useEffect, useState } from "react";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import { observer } from "mobx-react";
|
||||
import useSWR from "swr";
|
||||
// plane packages imports
|
||||
import { pullUsers } from "@plane/etl/jira";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { Button, Loader } from "@plane/ui";
|
||||
// plane web components
|
||||
import { ImportUsersFromJiraUploader } from "@/plane-web/components/importers/jira";
|
||||
@@ -13,13 +15,12 @@ import { AddSeatsAlertBanner, SkipUserImport, StepperNavigation } from "@/plane-
|
||||
import { useJiraImporter, useWorkspaceSubscription } from "@/plane-web/hooks/store";
|
||||
// plane web types
|
||||
import { E_IMPORTER_STEPS, TImporterDataPayload } from "@/plane-web/types/importers/jira";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
|
||||
type TFormData = TImporterDataPayload[E_IMPORTER_STEPS.IMPORT_USERS_FROM_JIRA];
|
||||
|
||||
const currentStepKey = E_IMPORTER_STEPS.IMPORT_USERS_FROM_JIRA;
|
||||
|
||||
export const ImportUsersFromJira: FC = () => {
|
||||
export const ImportUsersFromJira: FC = observer(() => {
|
||||
// hooks
|
||||
const {
|
||||
user,
|
||||
@@ -90,7 +91,7 @@ export const ImportUsersFromJira: FC = () => {
|
||||
);
|
||||
|
||||
const extraSeatRequired = additionalUsersData?.additionalUserCount - currentWorkspaceSubscriptionAvailableSeats;
|
||||
const isNextButtonDisabled = Boolean(extraSeatRequired > 0 && !formData.userSkipToggle);
|
||||
const isNextButtonDisabled = Boolean(extraSeatRequired > 0 && !formData.userSkipToggle) || Boolean(!formData.userSkipToggle && !formData.userData);
|
||||
|
||||
return (
|
||||
<div className="relative w-full h-full overflow-hidden overflow-y-auto flex flex-col justify-between gap-4">
|
||||
@@ -143,4 +144,4 @@ export const ImportUsersFromJira: FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
@@ -5,8 +5,8 @@ import Papa from "papaparse";
|
||||
import Dropzone, { Accept } from "react-dropzone";
|
||||
import { TriangleAlert, CircleCheck, X, Loader } from "lucide-react";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
|
||||
type TImportUsersFromJiraUploader = {
|
||||
handleValue: (value: string) => void;
|
||||
@@ -30,22 +30,22 @@ export const ImportUsersFromJiraUploader: FC<TImportUsersFromJiraUploader> = (pr
|
||||
processing: {
|
||||
className: "text-custom-text-200",
|
||||
icon: <Loader className="flex-shrink-0 w-3.5 h-3.5 spin-in-90" />,
|
||||
message: t("file_upload_status.processing"),
|
||||
message: t("file_upload.processing"),
|
||||
},
|
||||
error: {
|
||||
className: "text-red-500",
|
||||
icon: <TriangleAlert className="flex-shrink-0 w-3.5 h-3.5" />,
|
||||
message: t("file_upload_status.invalid"),
|
||||
message: t("file_upload.invalid"),
|
||||
},
|
||||
"missing-fields": {
|
||||
className: "text-yellow-500",
|
||||
icon: <TriangleAlert className="flex-shrink-0 w-3.5 h-3.5" />,
|
||||
message: t("file_upload_status.missing_fields"),
|
||||
message: t("file_upload.missing_fields"),
|
||||
},
|
||||
success: {
|
||||
className: "text-green-500",
|
||||
icon: <CircleCheck className="flex-shrink-0 w-3.5 h-3.5" />,
|
||||
message: t("file_upload_status.success", { fileName: "CSV" }),
|
||||
message: t("file_upload.success", { fileName: "CSV" }),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -60,15 +60,15 @@ export const PersonalAccessTokenAuth: FC = observer(() => {
|
||||
onChange: (e) => handleFormData("personalAccessToken", e.target.value),
|
||||
description: (
|
||||
<>
|
||||
You will get this from your{" "}
|
||||
{t("importers.token_helper")}{" "}
|
||||
<a
|
||||
tabIndex={-1}
|
||||
href="https://developers.linear.app/docs/graphql/working-with-the-graphql-api#personal-api-keys"
|
||||
href="https://linear.app/docs/security-and-access#personal-api-keys"
|
||||
target="_blank"
|
||||
className="text-custom-primary-100 hover:underline"
|
||||
rel="noreferrer"
|
||||
>
|
||||
Linear Security settings.
|
||||
Linear Security Settings.
|
||||
</a>
|
||||
</>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user