'Resolve the reference list of an item
@param item_id: the import item UID
@param import_list: the ordered list of items (UIDs) to import'

def resolve(self, item_id, import_list):

    item = self.items[item_id]
    if (item.lock or (item.accepted is False)):
        return False
    references = []
    for reference in item.references:
        ritem_id = reference.entry.item_id
        if (ritem_id and (ritem_id not in import_list)):
            references.append(ritem_id)
    for ritem_id in references:
        item.lock = True
        if self.resolve(ritem_id, import_list):
            import_list.append(ritem_id)
        item.lock = False
    return True
