Controlled_vocab_entry_id changes with every publishing/unpublishing operation

Hi @NateWr ,

lately I have been working a lot with the controlled vocab keywords and noticed something weird. I am not sure if this a bug or feature, so I am positing it here in case someone also noticed…

If I create a new submission and use a submission keyword, the keyword gets a unique controlled_vocab_entry_id which is saved in the controlled_vocab_entry_settings as well as controlled_vocab_entries tables.
Publishing this submission changes this unique ID. This is also the case when unpublishing and publishing again. I think the relevant code might be in the function insertKeywords in SubmissionKeywordDAO.inc.php.
Is this intentional?

Steps I took leading up to the issue

  1. Add a submission e.g. via quicksubmit
  2. Check in the controlled_vocab_entry_settings table for the added keyword and its controlled_vocab_entry_id
  3. Publish this submission (or publish and unpublish it again without changing anything)
  4. controlled_vocab_entry_id is changed

What application are you using?
OJS 3.3.0-3

Hope you can give me some more information on this…

Best,
Tina