fix: inbox description and mutation (#3677)

* fix: inbox status mutation fix

* fix: inbox description fix

* chore: added description in inbox issue

---------

Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
Anmol Singh Bhatia 2024-02-15 19:31:38 +05:30 committed by GitHub
parent 2cd16c61ba
commit 7628419a26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View File

@ -27,7 +27,7 @@ from plane.app.serializers import (
InboxSerializer,
InboxIssueSerializer,
IssueCreateSerializer,
IssueStateInboxSerializer,
IssueDetailSerializer,
)
from plane.utils.issue_filters import issue_filters
from plane.bgtasks.issue_activites_task import issue_activity
@ -333,7 +333,7 @@ class InboxIssueViewSet(BaseViewSet):
def retrieve(self, request, slug, project_id, inbox_id, issue_id):
issue = self.get_queryset().filter(pk=issue_id).first()
serializer = IssueSerializer(issue, expand=self.expand,)
serializer = IssueDetailSerializer(issue, expand=self.expand,)
return Response(serializer.data, status=status.HTTP_200_OK)
def destroy(self, request, slug, project_id, inbox_id, issue_id):

View File

@ -1,4 +1,5 @@
import React from "react";
import { observer } from "mobx-react";
// hooks
import { useInboxIssues } from "hooks/store";
// constants
@ -13,7 +14,7 @@ type Props = {
showDescription?: boolean;
};
export const InboxIssueStatus: React.FC<Props> = (props) => {
export const InboxIssueStatus: React.FC<Props> = observer((props) => {
const { workspaceSlug, projectId, inboxId, issueId, iconSize = 18, showDescription = false } = props;
// hooks
const {
@ -52,4 +53,4 @@ export const InboxIssueStatus: React.FC<Props> = (props) => {
)}
</div>
);
};
});

View File

@ -108,7 +108,7 @@ export const IssueDescriptionForm: FC<IssueDetailsProps> = observer((props) => {
description_html: issue.description_html === "" ? "<p></p>" : issue.description_html,
});
setLocalTitleValue(issue.name);
}, [issue, reset]);
}, [issue, issue.description_html, reset]);
// ADDING handleDescriptionFormSubmit TO DEPENDENCY ARRAY PRODUCES ADVERSE EFFECTS
// TODO: Verify the exhaustive-deps warning