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

[WEB-1177] fix: sub-issues count mutation. #4516

Merged
merged 4 commits into from
May 21, 2024

Conversation

prateekshourya29
Copy link
Collaborator

@prateekshourya29 prateekshourya29 commented May 19, 2024

Problem

The sub-issues-count was not updating upon creating a new sub-issue.

Solution

The count wasn't updating because it used a static value (issue.sub-issues-count) from the issue-detail data without re-fetching it. To fix this, I'm now updating the sub_issues_count data after every create/ remove/ delete operation in sub issues store.

Media

  • Before
scrnli_5_20_2024_1-37-14.AM.webm
  • After
scrnli_5_20_2024_1-36-13.AM.webm

This PR is linked to WEB-1177

Copy link
Collaborator

@SatishGandham SatishGandham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @prateekshourya29 , have you tried updating the parent issues sub_issues_count count property? Wouldn't that be a simpler solution?

@prateekshourya29
Copy link
Collaborator Author

Hi @prateekshourya29 , have you tried updating the parent issues sub_issues_count count property? Wouldn't that be a simpler solution?

Hey @SatishGandham, are you referring to updating it manually? Or we can also use the sub_issues store data to update sub_issue_count on every create/ remove/ delete action.

We can also re-fetch the parent issue details but that would cost us an extra API call for just one property update.

@prateekshourya29 prateekshourya29 marked this pull request as draft May 21, 2024 10:36
@prateekshourya29 prateekshourya29 marked this pull request as ready for review May 21, 2024 11:33
@SatishGandham SatishGandham merged commit 709cd9d into preview May 21, 2024
13 of 14 checks passed
@SatishGandham SatishGandham deleted the fix/sub-issue-count-mutation branch May 21, 2024 11:44
sriramveeraghanta pushed a commit that referenced this pull request May 21, 2024
* [WEB-1177] fix: sub-issues count mutation.

* chore: refactor sub_issues_count mutation logic.

* fix: build errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛bug Something isn't working 🌐frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants