I have a moodle assembly instance where we assemble courses, question banks etc. so in that, we have tags associate with each question in the question back.
the same tags (with same name, not the same rawname) exist in the target server.
When I move the question back along with the course, I expect the questions from the question bank to be tagged to these existing tags. instead, I am getting new tags created.
What is it that I am missing? As long as I have the same tag.name field, shouldnt the tags be assigned automatically instead of being created again?
That sounds like a bug to me. I suggest you set up a test with two local copies of the latest version of Moodle (3.1, as I write this) and see if this is still a problem. If it is, report it to http://tracker.moodle.org (after searching to see if it had already been reported.
so heres is what happened:
in environment A, course A has tags tg.nameA1 , tg.rawnameA1
when you move this to another environment B, the backup/restore is checking for tg.rawnameA1 to exists in tg.nameB row (instead of checking if tg.nameA1 exists in tg.nameB row). so it would add new tags (or attach to existing tags) but its not the same tags as the environment A