Skip to content

Commit

Permalink
Merge pull request #703 from larsenle/main
Browse files Browse the repository at this point in the history
DSS-935 Add last UpdUserNm (last update Full Name) and ManagingOrganizationId (parent organization ID) to Platformvw
  • Loading branch information
larsenle authored Oct 15, 2024
2 parents eaf050b + ef3c3a7 commit 0289828
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
34 changes: 34 additions & 0 deletions database/ddl/STR_DSS_Views_Sprint_16.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* Sprint 16 View Changes to STR DSS */

drop view if exists dss_platform_vw;

CREATE OR REPLACE VIEW dss_platform_vw AS
SELECT do2.organization_id
, do2.organization_type
, do2.organization_cd
, do2.organization_nm
, do2.managing_organization_id
, do2.is_active
, do2.platform_type
, dpt.platform_type_nm
, do2.upd_dtm
, do2.upd_user_guid
, dui.display_nm as upd_user_display_nm
, dui.display_nm as upd_user_given_nm
, dui.display_nm as upd_user_family_nm
, docp.organization_contact_person_id as primary_notice_of_takedown_contact_id
, docp.email_address_dsc as primary_notice_of_takedown_contact_email
, docp2.organization_contact_person_id as primary_takedown_request_contact_id
, docp2.email_address_dsc as primary_takedown_request_contact_email
, docp3.organization_contact_person_id as secondary_notice_of_takedown_contact_id
, docp3.email_address_dsc as secondary_notice_of_takedown_contact_email
, docp4.organization_contact_person_id as secondary_takedown_request_contact_id
, docp4.email_address_dsc as secondary_takedown_request_contact_email
FROM dss_organization do2
left join dss_platform_type dpt on dpt.platform_type = do2.platform_type
left join dss_user_identity dui on dui.user_guid = do2.upd_user_guid
left join dss_organization_contact_person docp on docp.contacted_through_organization_id = do2.organization_id and docp.email_message_type = 'Notice of Takedown' and docp.is_primary = true
left join dss_organization_contact_person docp2 on docp2.contacted_through_organization_id = do2.organization_id and docp2.email_message_type = 'Takedown Request' and docp2.is_primary = true
left join dss_organization_contact_person docp3 on docp3.contacted_through_organization_id = do2.organization_id and docp3.email_message_type = 'Notice of Takedown' and docp.is_primary != true
left join dss_organization_contact_person docp4 on docp4.contacted_through_organization_id = do2.organization_id and docp4.email_message_type = 'Takedown Request' and docp4.is_primary != true
where do2.organization_type = 'Platform';
8 changes: 6 additions & 2 deletions database/model/STR_DSS_Physical_DB_Design_Sprint_15.dbs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,9 @@
dbl.licence_status_type,
drl.effective_business_licence_no,
drl.effective_host_nm,
drl.is_changed_business_licence
drl.is_changed_business_licence,
drl.lg_transfer_dtm,
lgs.is_str_prohibited
FROM ((((((((dss.dss_rental_listing drl
JOIN dss.dss_organization org ON ((org.organization_id = drl.offering_organization_id)))
LEFT JOIN dss.dss_listing_status_type dlst ON (((drl.listing_status_type)::text = (dlst.listing_status_type)::text)))
Expand Down Expand Up @@ -1123,6 +1125,8 @@
<column name="effective_business_licence_no" type="varchar" />
<column name="effective_host_nm" type="varchar" />
<column name="is_changed_business_licence" type="boolean" />
<column name="lg_transfer_dtm" type="timestamptz" />
<column name="is_str_prohibited" type="boolean" />
</view>
<view name="dss_rental_upload_history_view" >
<view_script><![CDATA[CREATE OR REPLACE VIEW ${view} AS SELECT dud.upload_delivery_id,
Expand Down Expand Up @@ -1488,7 +1492,7 @@ END;$function$
Short Term Rental Data Sharing
Physical Data Diagram (Sprint 15)
Leif Larsen, DXC Technology
September 18, 2024]]></comment>
October 2, 2024]]></comment>
</callout>
</layout>
</project>

0 comments on commit 0289828

Please sign in to comment.