Matt Arena
-
2016-07-25
- status: open --> closed
Hi,
during HB 2016 we had several people with the wrong affiliation on their name tag. They used the CVS export for excel from the SPMS to create the list for the name tags which uses Regist_Maint.xls, when looking into this I sav that the method Regist_Maint.extract_address does not take into account multiple affiliations and their sort order.
On the other hand Registation.list that has a similiar functionality calls internally Common.get_user_affil_list which sorts affiliations by priority and produces the correct and expected result.
I guess the problematic code piece is in Regist_Maint.sql around line 1720:
PROCEDURE extract_address (crypt_pid VARCHAR2, sep_char VARCHAR) IS
CURSOR driver IS
SELECT addr.*, affil.affil_abbrev, affil.name1, affil.name2, affil.department
FROM affiliations affil,
addresses addr,
profiles pro
WHERE pro.person_id = common.DECRYPT(crypt_pid)
AND pro.deleted IS NULL
AND addr.address_id = pro.address_id
AND affil.affiliation_id = addr.affiliation_id;