Skip to content

Fix inability to add comments to a discussion in Design Management

Tom Quirk requested to merge fix-design-discussion-comment-bug into master

What does this MR do?

A bug was discovered whereby a user could not add a comment to an existing discussion on a design within design management. It appears to be in production, hence ~P1. Luckily, the data is still captured, and the user can see their comments with a refresh of the page, hence ~S3 (but could be ~S2, so apologies in advance if this is a mislabel). This bug has not been reported anywhere AFAIK

Reason bug existed

this.discussion.id was undefined (it was recently migrated from a Vue component).

How it is fixed

A parameter, discussionId, has been added to the function updateStoreAfterAddDiscussionComment.

Tests?

We should definitely be testing all code within cache_update file, however the necessary work to mock the Apollo store has not been done; after some brief investigation it is more than a trivial amount of work to do so. Therefore, in the interest of shipping this fix ASAP, I've opted to leave the tests out for now, with the intention of create tests updateStoreAfterAddDiscussionComment, as well as all other code in cache_update, ASAP (follow-up issue coming soon) See #38248.

Edited by 🤖 GitLab Bot 🤖

Merge request reports