Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promote: develop to stage-release #2140

Merged
merged 40 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
928ae77
fix: replace `Completion` with `ChatCompletion` to use `gpt-3.5-turbo…
ix64 Sep 5, 2023
065a4a3
feat: issue detail for web view
dakshesh14 Sep 5, 2023
8d5ff1a
fix: redirection after signing in on space
aaryan610 Sep 5, 2023
9027607
fix: validation in automation task (#2094)
NarayanBavisetti Sep 5, 2023
b40059e
feat: add links and permission to perform actions
dakshesh14 Sep 5, 2023
70ed3c1
Merge pull request #2097 from makeplane/feat/issue_detail_for_webview
sriramveeraghanta Sep 5, 2023
60c3d1a
feat: comment reactions
aaryan610 Sep 6, 2023
ac4127c
chore: add tooltip for user info
aaryan610 Sep 6, 2023
6d13332
style: add shadow to reaction selector
aaryan610 Sep 6, 2023
4b364f7
Merge pull request #2096 from makeplane/fix/login_redirection
sriramveeraghanta Sep 6, 2023
0dd336a
fix: don't render invalid dated issues
aaryan610 Sep 6, 2023
c5612ee
fix: don't render invalid dated cycles and modules
aaryan610 Sep 6, 2023
f11ae00
Merge pull request #2100 from makeplane/feat/comment_reactions
sriramveeraghanta Sep 6, 2023
b46a748
Merge pull request #2101 from makeplane/fix/gantt_issues
sriramveeraghanta Sep 6, 2023
4f0cac3
fix: issue object for filtering (#2102)
pablohashescobar Sep 6, 2023
2ad46d7
fix: public issue list endpoint n+1 (#2099)
pablohashescobar Sep 6, 2023
58562dc
fix: ui improvement and bug fixes (#2105)
anmolsinghbhatia Sep 6, 2023
1655d0c
feat: view, create, update and delete comment (#2106)
dakshesh14 Sep 6, 2023
85f7970
fix: edit issue comment mutation (#2109)
aaryan610 Sep 6, 2023
b47c7d3
fix: Improved Image Deletion Logic, Image ID Issue in Modals and Perf…
Palanikannan1437 Sep 7, 2023
d26aa1b
chore: render proper icons for due dates (#2114)
aaryan610 Sep 7, 2023
8143690
chore: option to switch access of a comment (#2116)
aaryan610 Sep 7, 2023
9c35108
dev: update python packages (#2095)
pablohashescobar Sep 7, 2023
866eead
fix: issue comment ordering for public boards (#2108)
pablohashescobar Sep 7, 2023
39bc975
fix: remove triage issue status from public boards (#2110)
pablohashescobar Sep 7, 2023
8ea6dd4
fix: onboarding role select dropdown text color (#2117)
aaryan610 Sep 7, 2023
5989f24
fix: update plane logo (#2118)
aaryan610 Sep 7, 2023
8ba482b
chore: response status for project views update (#2111)
pablohashescobar Sep 7, 2023
6d52707
editor fixes for space (#2119)
sriramveeraghanta Sep 7, 2023
faa6a2b
feat: select blocker, blocking, and parent (#2121)
dakshesh14 Sep 7, 2023
1872dff
fix: custom date filter not working on my issues and profile issues (…
aaryan610 Sep 8, 2023
49d0b3f
fix: handleClose function of the export modal (#2124)
aaryan610 Sep 8, 2023
ad8a011
fix: issue activity (#2127)
dakshesh14 Sep 11, 2023
5b228bd
chore: update state icons and colors (#2126)
aaryan610 Sep 11, 2023
8de93d0
chore: remove getServerSideProps (#2130)
aaryan610 Sep 11, 2023
7842c4b
fix: authorize editor (#2122)
dakshesh14 Sep 11, 2023
4447a4b
fix: Tiptap comment card fix for space (#2129)
Palanikannan1437 Sep 11, 2023
1a37668
fix: husky was removed in commit #2086, but prepare still uses it (#2…
thomasync Sep 11, 2023
9912580
fix: query checking (#2137)
dakshesh14 Sep 11, 2023
7bb73b7
refactor: priority icon component (#2132)
aaryan610 Sep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apiserver/plane/api/views/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ def post(self, request, slug, project_id):
final_text = task + "\n" + prompt

openai.api_key = settings.OPENAI_API_KEY
response = openai.Completion.create(
response = openai.ChatCompletion.create(
model=settings.GPT_ENGINE,
prompt=final_text,
messages=[{"role": "user", "content": final_text}],
temperature=0.7,
max_tokens=1024,
)

workspace = Workspace.objects.get(slug=slug)
project = Project.objects.get(pk=project_id)

text = response.choices[0].text.strip()
text = response.choices[0].message.content.strip()
text_html = text.replace("\n", "<br/>")
return Response(
{
Expand Down
9 changes: 8 additions & 1 deletion apiserver/plane/api/views/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ def get_queryset(self):
)
)
.distinct()
)
).order_by("created_at")
else:
return IssueComment.objects.none()
except ProjectDeployBoard.DoesNotExist:
Expand Down Expand Up @@ -2100,6 +2100,12 @@ def get(self, request, slug, project_id):
queryset=IssueReaction.objects.select_related("actor"),
)
)
.prefetch_related(
Prefetch(
"votes",
queryset=IssueVote.objects.select_related("actor"),
)
)
.filter(**filters)
.annotate(cycle_id=F("issue_cycle__cycle_id"))
.annotate(module_id=F("issue_module__module_id"))
Expand Down Expand Up @@ -2189,6 +2195,7 @@ def get(self, request, slug, project_id):

states = (
State.objects.filter(
~Q(name="Triage"),
workspace__slug=slug,
project_id=project_id,
)
Expand Down
5 changes: 2 additions & 3 deletions apiserver/plane/api/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def create(self, request):
# Delete joined project invites
project_invitations.delete()

return Response(status=status.HTTP_200_OK)
return Response(status=status.HTTP_204_NO_CONTENT)
except Exception as e:
capture_exception(e)
return Response(
Expand Down Expand Up @@ -924,8 +924,7 @@ def post(self, request, slug, project_id):

project_member.save()

return Response(status=status.HTTP_200_OK)

return Response(status=status.HTTP_204_NO_CONTENT)
except Project.DoesNotExist:
return Response(
{"error": "The requested resource does not exists"},
Expand Down
10 changes: 5 additions & 5 deletions apiserver/plane/api/views/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def get_queryset(self):
)

issue_count = (
Issue.objects.filter(workspace=OuterRef("id"))
Issue.issue_objects.filter(workspace=OuterRef("id"))
.order_by()
.annotate(count=Func(F("id"), function="Count"))
.values("count")
Expand Down Expand Up @@ -203,7 +203,7 @@ def get(self, request):
)

issue_count = (
Issue.objects.filter(workspace=OuterRef("id"))
Issue.issue_objects.filter(workspace=OuterRef("id"))
.order_by()
.annotate(count=Func(F("id"), function="Count"))
.values("count")
Expand Down Expand Up @@ -532,7 +532,7 @@ def create(self, request):
# Delete joined workspace invites
workspace_invitations.delete()

return Response(status=status.HTTP_200_OK)
return Response(status=status.HTTP_204_NO_CONTENT)
except Exception as e:
capture_exception(e)
return Response(
Expand Down Expand Up @@ -846,7 +846,7 @@ def post(self, request, slug):
workspace_member.view_props = request.data.get("view_props", {})
workspace_member.save()

return Response(status=status.HTTP_200_OK)
return Response(status=status.HTTP_204_NO_CONTENT)
except WorkspaceMember.DoesNotExist:
return Response(
{"error": "User not a member of workspace"},
Expand Down Expand Up @@ -1075,7 +1075,7 @@ def get(self, request, slug, user_id):
priority_order = ["urgent", "high", "medium", "low", None]

priority_distribution = (
Issue.objects.filter(
Issue.issue_objects.filter(
workspace__slug=slug,
assignees__in=[user_id],
project__project_projectmember__member=request.user,
Expand Down
60 changes: 31 additions & 29 deletions apiserver/plane/bgtasks/issue_automation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def archive_old_issues():
archive_in = project.archive_in

# Get all the issues whose updated_at in less that the archive_in month
issues = Issue.objects.filter(
issues = Issue.issue_objects.filter(
Q(
project=project_id,
archived_at__isnull=True,
Expand Down Expand Up @@ -64,21 +64,22 @@ def archive_old_issues():
issues_to_update.append(issue)

# Bulk Update the issues and log the activity
updated_issues = Issue.objects.bulk_update(
issues_to_update, ["archived_at"], batch_size=100
)
[
issue_activity.delay(
type="issue.activity.updated",
requested_data=json.dumps({"archived_at": str(issue.archived_at)}),
actor_id=str(project.created_by_id),
issue_id=issue.id,
project_id=project_id,
current_instance=None,
subscriber=False,
if issues_to_update:
updated_issues = Issue.objects.bulk_update(
issues_to_update, ["archived_at"], batch_size=100
)
for issue in updated_issues
]
[
issue_activity.delay(
type="issue.activity.updated",
requested_data=json.dumps({"archived_at": str(issue.archived_at)}),
actor_id=str(project.created_by_id),
issue_id=issue.id,
project_id=project_id,
current_instance=None,
subscriber=False,
)
for issue in updated_issues
]
return
except Exception as e:
if settings.DEBUG:
Expand All @@ -99,7 +100,7 @@ def close_old_issues():
close_in = project.close_in

# Get all the issues whose updated_at in less that the close_in month
issues = Issue.objects.filter(
issues = Issue.issue_objects.filter(
Q(
project=project_id,
archived_at__isnull=True,
Expand Down Expand Up @@ -136,19 +137,20 @@ def close_old_issues():
issues_to_update.append(issue)

# Bulk Update the issues and log the activity
updated_issues = Issue.objects.bulk_update(issues_to_update, ["state"], batch_size=100)
[
issue_activity.delay(
type="issue.activity.updated",
requested_data=json.dumps({"closed_to": str(issue.state_id)}),
actor_id=str(project.created_by_id),
issue_id=issue.id,
project_id=project_id,
current_instance=None,
subscriber=False,
)
for issue in updated_issues
]
if issues_to_update:
updated_issues = Issue.objects.bulk_update(issues_to_update, ["state"], batch_size=100)
[
issue_activity.delay(
type="issue.activity.updated",
requested_data=json.dumps({"closed_to": str(issue.state_id)}),
actor_id=str(project.created_by_id),
issue_id=issue.id,
project_id=project_id,
current_instance=None,
subscriber=False,
)
for issue in updated_issues
]
return
except Exception as e:
if settings.DEBUG:
Expand Down
4 changes: 2 additions & 2 deletions apiserver/plane/utils/analytics_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def burndown_plot(queryset, slug, project_id, cycle_id=None, module_id=None):
chart_data = {str(date): 0 for date in date_range}

completed_issues_distribution = (
Issue.objects.filter(
Issue.issue_objects.filter(
workspace__slug=slug,
project_id=project_id,
issue_cycle__cycle_id=cycle_id,
Expand All @@ -118,7 +118,7 @@ def burndown_plot(queryset, slug, project_id, cycle_id=None, module_id=None):
chart_data = {str(date): 0 for date in date_range}

completed_issues_distribution = (
Issue.objects.filter(
Issue.issue_objects.filter(
workspace__slug=slug,
project_id=project_id,
issue_module__module_id=module_id,
Expand Down
26 changes: 13 additions & 13 deletions apiserver/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
# base requirements

Django==4.2.3
Django==4.2.5
django-braces==1.15.0
django-taggit==4.0.0
psycopg==3.1.9
psycopg==3.1.10
django-oauth-toolkit==2.3.0
mistune==3.0.1
djangorestframework==3.14.0
redis==4.6.0
django-nested-admin==4.0.2
django-cors-headers==4.1.0
django-cors-headers==4.2.0
whitenoise==6.5.0
django-allauth==0.54.0
django-allauth==0.55.2
faker==18.11.2
django-filter==23.2
jsonmodels==2.6.0
djangorestframework-simplejwt==5.2.2
sentry-sdk==1.27.0
djangorestframework-simplejwt==5.3.0
sentry-sdk==1.30.0
django-s3-storage==0.14.0
django-crum==0.7.9
django-guardian==2.4.0
dj_rest_auth==2.2.5
google-auth==2.21.0
google-api-python-client==2.92.0
google-auth==2.22.0
google-api-python-client==2.97.0
django-redis==5.3.0
uvicorn==0.22.0
uvicorn==0.23.2
channels==4.0.0
openai==0.27.8
openai==0.28.0
slack-sdk==3.21.3
celery==5.3.1
celery==5.3.4
django_celery_beat==2.5.0
psycopg-binary==3.1.9
psycopg-c==3.1.9
psycopg-binary==3.1.10
psycopg-c==3.1.10
scout-apm==2.26.1
openpyxl==3.1.2
10 changes: 5 additions & 5 deletions apiserver/requirements/production.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
-r base.txt

dj-database-url==2.0.0
gunicorn==20.1.0
dj-database-url==2.1.0
gunicorn==21.2.0
whitenoise==6.5.0
django-storages==1.13.2
boto3==1.27.0
django-anymail==10.0
django-storages==1.14
boto3==1.28.40
django-anymail==10.1
django-debug-toolbar==4.1.0
gevent==23.7.0
psycogreen==1.0.2
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"packages/*"
],
"scripts": {
"prepare": "husky install",
"build": "turbo run build",
"dev": "turbo run dev",
"start": "turbo run start",
Expand Down
2 changes: 1 addition & 1 deletion space/components/accounts/onboarding-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const OnBoardingForm: React.FC<Props> = observer(({ user }) => {
type="button"
className={`flex items-center justify-between gap-1 w-full rounded-md border border-custom-border-300 shadow-sm duration-300 focus:outline-none px-3 py-2 text-sm`}
>
<span className="text-custom-text-400">{value || "Select your role..."}</span>
<span className={value ? "" : "text-custom-text-400"}>{value || "Select your role..."}</span>
<ChevronDownIcon className="h-3 w-3" aria-hidden="true" />
</Listbox.Button>

Expand Down
9 changes: 5 additions & 4 deletions space/components/accounts/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import useToast from "hooks/use-toast";
// components
import { EmailPasswordForm, GithubLoginButton, GoogleLoginButton, EmailCodeForm } from "components/accounts";
// images
import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.svg";
import BluePlaneLogoWithoutText from "public/plane-logos/blue-without-text.png";

export const SignInView = observer(() => {
const { user: userStore } = useMobxStore();

const router = useRouter();
const { next_path } = router.query;

const { setToastAlert } = useToast();

Expand All @@ -34,13 +33,15 @@ export const SignInView = observer(() => {
const onSignInSuccess = (response: any) => {
const isOnboarded = response?.user?.onboarding_step?.profile_complete || false;

const nextPath = router.asPath.includes("next_path") ? router.asPath.split("/?next_path=")[1] : "/";

userStore.setCurrentUser(response?.user);

if (!isOnboarded) {
router.push(`/onboarding?next_path=${next_path}`);
router.push(`/onboarding?next_path=${nextPath}`);
return;
}
router.push((next_path ?? "/").toString());
router.push((nextPath ?? "/").toString());
};

const handleGoogleSignIn = async ({ clientId, credential }: any) => {
Expand Down
Loading
Loading