Other slot mapping in Form action

Hi, I was wondering something about the Form action. At each “turn” we look for extracting all requested slots (even if that’s not the current one). But if that slot is aimed to be extracted from entity, it won’t work if the entity has not the same name as the slot. Indeed if we look around L218 of extract_other_slots in forms.py, we have that block:

        for other_slot_mapping in other_slot_mappings:
            # check whether the slot should be filled
            # by entity with the same name
            should_fill_entity_slot = (
                other_slot_mapping["type"] == "from_entity"
                and other_slot_mapping.get("entity") == slot
                and self.intent_is_desired(other_slot_mapping, tracker)
            )
            # check whether the slot should be
            # filled from trigger intent mapping
            should_fill_trigger_slot = (
                tracker.active_form.get("name") != self.name()
                and other_slot_mapping["type"] == "from_trigger_intent"
                and self.intent_is_desired(other_slot_mapping, tracker)
            )
            if should_fill_entity_slot:
                value = self.get_entity_value(slot, tracker)
            elif should_fill_trigger_slot:
                value = other_slot_mapping.get("value")
            else:
                value = None

So I would like to know if that’s the intended behavior and if not, I guess we should remove or change the check

and other_slot_mapping.get("entity") == slot

Pinging @Ghostvv after having going through commit history.

it is intended behavior, there are discussions about that somewhere in the forum/github issues

thanks! I will look for that.