incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

Tags will not be synced to search plugin when adding new question

Open hgaol opened this issue 1 year ago • 3 comments

Describe the bug when adding a new question, the corresponding tags will not be synced to search plugin because the TagRel entities have not been created yet.

To Reproduce Steps to reproduce the behavior:

  1. enable one of the search plugin, e.g. elastic search
  2. enable the search plugin in Admin page.
  3. add a new question with tags.
  4. after question created, you can find that the tags have not been synced to the search plugin.

Expected behavior question as well as its tags are all synced to search plugin. The root cause is that the TagRel entities are not been created yet when updating search.

Screenshots If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):

  • Device: [Desktop]
  • OS: [Windows/WSL]
  • Browser [chrome]
  • Version [main branch]

hgaol avatar Dec 26 '23 03:12 hgaol

@hgaol Thanks for the feedback. This is indeed a bug. It should sync the data of the question to the plugin once again after creating the relation between the question and the tag.

LinkinStars avatar Dec 26 '23 04:12 LinkinStars

Thanks @LinkinStars ! I've created a PR to fix this issue.

BTW, one thing makes me little confused that which branch should I baded on when working on a feature or bug fix? I'm not sure main or dev. Because I saw commits from dev branch have been merged into my branch for this PR. If dev branch is the recommended one, I can directly fork and develop based on it.

hgaol avatar Dec 26 '23 04:12 hgaol

Thanks @LinkinStars ! I've created a PR to fix this issue.

BTW, one thing makes me little confused that which branch should I baded on when working on a feature or bug fix? I'm not sure main or dev. Because I saw commits from dev branch have been merged into my branch for this PR. If dev branch is the recommended one, I can directly fork and develop based on it.

Thank you for your contribution and we will be reviewing it ASAP. The difference between the mai and dev branch is simple: the main branch goes straight to the latest release(v1.2.1), whereas dev goes to the next release(v1.2.5). If we set a milestone(v1.2.5) for this issue to be fixed in the next release, so it's better to start development base on the dev branch.

LinkinStars avatar Dec 26 '23 06:12 LinkinStars