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

Comment page is not changed when object code is changed #2145

Open
hieplpvip opened this issue Jan 27, 2023 · 2 comments
Open

Comment page is not changed when object code is changed #2145

hieplpvip opened this issue Jan 27, 2023 · 2 comments

Comments

@hieplpvip
Copy link
Contributor

For example, a problem with code example will have its comments stored in page p:example. When the problem code is changed to example2, the new page would be p:example2. However, the existing comments still have page p:example. As a result, all comments are lost (until the problem is renamed back to example).

@int-y1
Copy link
Contributor

int-y1 commented Jan 27, 2023

Comments on the editorial page may also be affected

@Xyene
Copy link
Member

Xyene commented Feb 5, 2023

def get_comment_page(self):
return 'p:%s' % self.object.code

This needs to change to use the problem ID (and solution ID, for the editorial views). We should also have a migration that ports comments over to the id-based comment keys.

Comment locks are also affected, and would also need to be migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants