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

fix: no 'Create by me' label coming up #1573

Merged
merged 49 commits into from
Jul 19, 2023
Merged
Changes from 4 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
b2451ac
feat: added new issue subscriber table
NarayanBavisetti Jun 21, 2023
9fd245a
Merge branch 'develop' of github.com:makeplane/plane into feat/notifi…
pablohashescobar Jun 22, 2023
f80f98d
dev: notification model
pablohashescobar Jun 22, 2023
b22e062
feat: added CRUD operation for issue subscriber
NarayanBavisetti Jun 22, 2023
9c0a2b7
Revert "feat: added CRUD operation for issue subscriber"
NarayanBavisetti Jun 22, 2023
cf4bb02
feat: added CRUD operation for issue subscriber
NarayanBavisetti Jun 22, 2023
0af4930
dev: notification models and operations
pablohashescobar Jun 22, 2023
ecfc09d
Merge branch 'feat/notifications' of github.com:makeplane/plane into …
pablohashescobar Jun 22, 2023
2cd3dc2
dev: remove delete endpoint response data
pablohashescobar Jun 22, 2023
8260e2f
Merge branch 'develop' of github.com:makeplane/plane into feat/notifi…
pablohashescobar Jun 22, 2023
dcde6b2
dev: notification endpoints and fix bg worker for saving notifications
pablohashescobar Jun 22, 2023
be96ec4
feat: added list and unsubscribe function in issue subscriber
NarayanBavisetti Jun 22, 2023
e73b39f
dev: filter by snoozed and response update for list and permissions
pablohashescobar Jun 23, 2023
ebc9f36
Merge branch 'develop' of github.com:makeplane/plane into feat/notifi…
pablohashescobar Jul 3, 2023
ea605cf
dev: update issue notifications
pablohashescobar Jul 3, 2023
9a6026c
Merge branch 'develop' of github.com:makeplane/plane into feat/notifi…
pablohashescobar Jul 7, 2023
581dff5
dev: notification segregation
pablohashescobar Jul 7, 2023
90c819b
dev: update notifications
pablohashescobar Jul 7, 2023
6c3be6f
dev: notification filtering
pablohashescobar Jul 10, 2023
624dfdb
dev: add issue name in notifications
pablohashescobar Jul 10, 2023
cc513b9
dev: notification new endpoints
pablohashescobar Jul 11, 2023
c65f93c
fix: resolved merge conflict
NarayanBavisetti Jul 12, 2023
53487ea
fix: pushing local settings
NarayanBavisetti Jul 12, 2023
e802790
feat: notification workflow setup and made basic UI
dakshesh14 Jul 13, 2023
fd9d76f
fix: merge conflict
dakshesh14 Jul 13, 2023
be39b09
fix: merge conflict
dakshesh14 Jul 13, 2023
7045f80
style: improved UX with toast alerts and other interactions
dakshesh14 Jul 14, 2023
82d03b4
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
dakshesh14 Jul 14, 2023
cc2146a
feat: showing un-read notification count
dakshesh14 Jul 17, 2023
5b22b66
fix: merge conflicts
dakshesh14 Jul 17, 2023
110be4c
feat: not showing 'subscribe' button on issue created by user & assig…
dakshesh14 Jul 17, 2023
b080b30
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
dakshesh14 Jul 17, 2023
e3d489a
fix: 'read' -> 'unread' heading, my issue wrong filter
dakshesh14 Jul 18, 2023
fdae567
feat: made snooze dropdown & modal
dakshesh14 Jul 18, 2023
ed57a24
style: consistent font sizes, colors and spacing
aaryan610 Jul 18, 2023
edf60da
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
aaryan610 Jul 19, 2023
d04ac5d
fix: minor ui fixes
aaryan610 Jul 19, 2023
bb6ec20
feat: snooze modal date/time select
dakshesh14 Jul 19, 2023
9cabd65
Merge branch 'feat/frontend/notifications' of https://github.com/make…
dakshesh14 Jul 19, 2023
c7a6cdf
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
dakshesh14 Jul 19, 2023
31501f5
fix: params for read/un-read notification
dakshesh14 Jul 19, 2023
40fa1b7
style: snooze notification modal
aaryan610 Jul 19, 2023
4ef22bc
Merge branch 'feat/frontend/notifications' of https://github.com/make…
aaryan610 Jul 19, 2023
d91659d
fix: no label for 'Create by me'
dakshesh14 Jul 19, 2023
cd525b0
Merge branch 'feat/frontend/notifications' of https://github.com/make…
dakshesh14 Jul 19, 2023
c426bce
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
dakshesh14 Jul 19, 2023
58111df
fix: no label for 'Create by me'
dakshesh14 Jul 19, 2023
372bbf8
fix: removed console log
dakshesh14 Jul 19, 2023
1575639
fix: tooltip going behind popover
dakshesh14 Jul 19, 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
10 changes: 5 additions & 5 deletions apiserver/plane/api/serializers/issue.py
Original file line number Diff line number Diff line change
@@ -534,11 +534,11 @@ class Meta:


class IssueSubscriberSerializer(BaseSerializer):
project = serializers.PrimaryKeyRelatedField(read_only=True)
workspace = serializers.PrimaryKeyRelatedField(read_only=True)
issue = serializers.PrimaryKeyRelatedField(read_only=True)
subscriber = serializers.PrimaryKeyRelatedField(read_only=True)

class Meta:
model = IssueSubscriber
fields = "__all__"
read_only_fields = [
"workspace",
"project",
"issue",
]
24 changes: 21 additions & 3 deletions apiserver/plane/api/urls.py
Original file line number Diff line number Diff line change
@@ -804,11 +804,29 @@
## End IssueComments
# Issue Subscribers
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/subscribers/",
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/issue-subscribers/",
IssueSubscriberViewSet.as_view(
{"get": "list", "post": "create", "delete": "destroy"}
{
"get": "list",
"post": "create",
}
),
name="project-issue-subscribers",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/issue-subscribers/<uuid:subscriber_id>/",
IssueSubscriberViewSet.as_view({"delete": "destroy"}),
name="project-issue-subscribers",
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/issues/<uuid:issue_id>/subscribe/",
IssueSubscriberViewSet.as_view(
{
"get": "subscription_status",
"post": "subscribe",
}
),
name="project-issue-subscriber",
name="project-issue-subscribers",
),
## End Issue Subscribers
## IssueProperty
71 changes: 70 additions & 1 deletion apiserver/plane/api/views/issue.py
Original file line number Diff line number Diff line change
@@ -856,7 +856,8 @@ class IssueSubscriberViewSet(BaseViewSet):

def perform_create(self, serializer):
serializer.save(
subscriber_id=self.request.user.id, issue_id=self.kwargs.get("issue_id")
project_id=self.kwargs.get("project_id"),
issue_id=self.kwargs.get("issue_id"),
)

def get_queryset(self):
@@ -870,3 +871,71 @@ def get_queryset(self):
.order_by("-created_at")
.distinct()
)

def subscribe(self, request, slug, project_id, issue_id):
try:
if IssueSubscriber.objects.filter(
issue_id=issue_id,
subscriber=request.user,
workspace__slug=slug,
project=project_id,
).exists():
return Response(
{"message": "User already subscribed to the issue."},
status=status.HTTP_400_BAD_REQUEST,
)

subscriber = IssueSubscriber.objects.create(
issue_id=issue_id,
subscriber_id=request.user.id,
project_id=project_id,
)
serilaizer = IssueSubscriberSerializer(subscriber)
return Response(serilaizer.data, status=status.HTTP_201_CREATED)
except Exception as e:
capture_exception(e)
return Response(
{"error": "Something went wrong, please try again later"},
status=status.HTTP_400_BAD_REQUEST,
)

def subscription_status(self, request, slug, project_id, issue_id):
try:
issue_subscriber = IssueSubscriber.objects.filter(
issue=issue_id,
subscriber=request.user,
workspace__slug=slug,
project=project_id,
).exists()
return Response({"subscribed": issue_subscriber}, status=status.HTTP_200_OK)
except Exception as e:
capture_exception(e)
return Response(
{"error": "Something went wrong, please try again later"},
status=status.HTTP_400_BAD_REQUEST,
)

def destroy(self, request, slug, project_id, issue_id, subscriber_id):
try:
issue_subscriber = IssueSubscriber.objects.get(
project=project_id,
subscriber=subscriber_id,
workspace__slug=slug,
issue=issue_id,
)
issue_subscriber.delete()
return Response(
{"message": "Removed Subscription"},
status=status.HTTP_200_OK,
)
except IssueSubscriber.DoesNotExist:
return Response(
{"error": "User is not subscribed to this issue"},
status=status.HTTP_400_BAD_REQUEST,
)
except Exception as e:
capture_exception(e)
return Response(
{"error": "Something went wrong please try again later"},
status=status.HTTP_400_BAD_REQUEST,
)