From f406bb0a5b85d43e3078d9d28f39f5e165b117ec Mon Sep 17 00:00:00 2001 From: Cory Covington Date: Thu, 15 Apr 2021 11:10:02 -0400 Subject: [PATCH 1/2] adding naming convention for available bidders list --- talentmap_api/fsbid/services/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/talentmap_api/fsbid/services/client.py b/talentmap_api/fsbid/services/client.py index 0b1dff7c1..b8e73ac15 100644 --- a/talentmap_api/fsbid/services/client.py +++ b/talentmap_api/fsbid/services/client.py @@ -293,12 +293,14 @@ def fsbid_clients_to_talentmap_clients_for_csv(data): def get_middle_name(employee): middle_name = employee.get('per_middle_name', None) or '' middle_initial = '' + middle_initial_ab = '' if middle_name == 'NMN': middle_name = '' if middle_name: middle_name = middle_name + ' ' middle_initial = middle_name[:1] + ' ' - return {"full": middle_name, "initial": middle_initial} + middle_initial_ab = ' ' + middle_name[:1] + return {"full": middle_name, "initial": middle_initial, "initial_ab": middle_initial_ab} def hru_id_filter(query): @@ -603,6 +605,7 @@ def fsbid_available_bidder_to_talentmap(data): }, "name": f"{employee.get('per_first_name', None)} {middle_name['full']}{employee.get('per_last_name', None)}", "shortened_name": f"{employee.get('per_first_name', None)} {middle_name['initial']}{employee.get('per_last_name', None)}", + "ab_name": f"{employee.get('per_last_name', None)}, {employee.get('per_first_name', None)}{middle_name['initial_ab']}", "initials": initials, "perdet_seq_number": str(employee.get("perdet_seq_num", None)), "grade": employee.get("per_grade_code", None), From 9b55c5feae62f6fc92d3437cd020c1423cb7ac28 Mon Sep 17 00:00:00 2001 From: Cory Covington Date: Mon, 19 Apr 2021 13:26:25 -0400 Subject: [PATCH 2/2] PR feedback simplification --- talentmap_api/fsbid/services/client.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/talentmap_api/fsbid/services/client.py b/talentmap_api/fsbid/services/client.py index b8e73ac15..6e775e0d3 100644 --- a/talentmap_api/fsbid/services/client.py +++ b/talentmap_api/fsbid/services/client.py @@ -293,14 +293,12 @@ def fsbid_clients_to_talentmap_clients_for_csv(data): def get_middle_name(employee): middle_name = employee.get('per_middle_name', None) or '' middle_initial = '' - middle_initial_ab = '' if middle_name == 'NMN': middle_name = '' if middle_name: middle_name = middle_name + ' ' middle_initial = middle_name[:1] + ' ' - middle_initial_ab = ' ' + middle_name[:1] - return {"full": middle_name, "initial": middle_initial, "initial_ab": middle_initial_ab} + return {"full": middle_name, "initial": middle_initial} def hru_id_filter(query): @@ -603,9 +601,8 @@ def fsbid_available_bidder_to_talentmap(data): "email": data.get('cdo_email', None), "hru_id": data.get("hru_id", None), }, - "name": f"{employee.get('per_first_name', None)} {middle_name['full']}{employee.get('per_last_name', None)}", + "name": f"{employee.get('per_last_name', None)}, {employee.get('per_first_name', None)} {middle_name['initial']}", "shortened_name": f"{employee.get('per_first_name', None)} {middle_name['initial']}{employee.get('per_last_name', None)}", - "ab_name": f"{employee.get('per_last_name', None)}, {employee.get('per_first_name', None)}{middle_name['initial_ab']}", "initials": initials, "perdet_seq_number": str(employee.get("perdet_seq_num", None)), "grade": employee.get("per_grade_code", None),