Skip to content

Commit

Permalink
Merge pull request #14 from atlas-bi/alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherpickering authored Jul 25, 2022
2 parents 4b1219b + d6cb4a5 commit 5c2d371
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions atlas_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def build_doc(collection: SimpleNamespace) -> Dict:
, updater.Fullname_calc as modified_by
, case when isnull((select Value from app.GlobalSiteSettings where Name = 'collections_search_visibility'),'N') = 'N' or Hidden='Y' then 'N' else 'Y' end as visible
, STUFF((select '~|~' + i.name from app.Initiative i where i.DataInitiativeID=p.datainitiativeid FOR XML PATH('')), 1, 3, '') initiative_name
, STUFF((select '~|~' + i.description from app.Initiative i where i.DataInitiativeID=p.datainitiativeid FOR XML PATH('')), 1, 3, '') initiative_description
, STUFF((select '~|~' + i.name from app.Initiative i where i.DataInitiativeID=p.datainitiativeid and isnull(i.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_name
, STUFF((select '~|~' + i.description from app.Initiative i where i.DataInitiativeID=p.datainitiativeid and isnull(i.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_description
, STUFF((select '~|~' + t.name from app.CollectionTerm a inner join app.term t on a.TermId = t.termid where a.DataProjectId=p.DataProjectID FOR XML PATH('')), 1, 3, '') term_name
Expand Down
2 changes: 1 addition & 1 deletion atlas_initiatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def build_doc(initiative: SimpleNamespace) -> Dict:
, s.name as strategic_importance
, i.LastUpdateDate as modified_at
, updater.Fullname_calc as modified_by
, case when isnull((select Value from app.GlobalSiteSettings where Name = 'initiatives_search_visibility'),'N') = 'N' then 'N' else 'Y' end as visible
, case when isnull((select Value from app.GlobalSiteSettings where Name = 'initiatives_search_visibility'),'N') = 'N' or i.Hidden='Y' then 'N' else 'Y' end as visible
, STUFF((select '~|~' + p.name from app.Collection p where i.DataInitiativeID=p.datainitiativeid and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_name
, STUFF((select '~|~' + p.Purpose + '~|~' + p.description from app.Collection p where i.DataInitiativeID=p.datainitiativeid and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_description
Expand Down
4 changes: 2 additions & 2 deletions atlas_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def build_doc(report: SimpleNamespace) -> Dict:
, STUFF((select '~|~' + p.name from app.CollectionReport a inner join app.Collection p on a.DataProjectId = p.DataProjectID where a.ReportId = r.ReportObjectID and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_name
, STUFF((select '~|~' + p.Description + '~|~' + p.Purpose from app.CollectionReport a inner join app.Collection p on a.DataProjectId = p.DataProjectID where a.ReportId = r.ReportObjectID and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_description
, STUFF((select '~|~' + i.name from app.CollectionReport a inner join app.Collection p on a.DataProjectId = p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.DataInitiativeID where a.ReportId = r.ReportObjectID and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_name
, STUFF((select '~|~' + i.Description + '~|~' + p.Purpose from app.CollectionReport a inner join app.Collection p on a.DataProjectId = p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.DataInitiativeID where a.ReportId = r.ReportObjectID and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_description
, STUFF((select '~|~' + i.name from app.CollectionReport a inner join app.Collection p on a.DataProjectId = p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.DataInitiativeID where a.ReportId = r.ReportObjectID and isnull(p.Hidden,'N')='N' and isnull(i.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_name
, STUFF((select '~|~' + i.Description + '~|~' + p.Purpose from app.CollectionReport a inner join app.Collection p on a.DataProjectId = p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.DataInitiativeID where a.ReportId = r.ReportObjectID and isnull(p.Hidden,'N')='N' and isnull(i.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_description
Expand Down
8 changes: 4 additions & 4 deletions atlas_terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def build_doc(term: SimpleNamespace) -> Dict:
, t.LastUpdatedDateTime as modified_at
, updater.Fullname_calc as modified_by
, case when isnull((select Value from app.GlobalSiteSettings where Name = 'terms_search_visibility'),'N') = 'N' then 'N' else 'Y' end as visible
, STUFF((select '~|~' + p.name from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID where a.TermId=t.TermId and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_name
, STUFF((select '~|~' + p.description from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID where a.TermId=t.TermId and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_description
, STUFF((select '~|~' + p.name from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID where a.TermId=t.TermId and isnull(p.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_name
, STUFF((select '~|~' + p.description from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID where a.TermId=t.TermId and isnull(p.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') collection_description
, STUFF((select '~|~' + i.name from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.datainitiativeid where a.TermId=t.TermId and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_name
, STUFF((select '~|~' + i.description from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.datainitiativeid where a.TermId=t.TermId and isnull(Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_description
, STUFF((select '~|~' + i.name from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.datainitiativeid where a.TermId=t.TermId and isnull(p.Hidden,'N')='N' and isnull(i.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_name
, STUFF((select '~|~' + i.description from app.CollectionTerm a inner join app.Collection p on a.DataProjectId=p.DataProjectID inner join app.Initiative i on i.DataInitiativeID=p.datainitiativeid where a.TermId=t.TermId and isnull(p.Hidden,'N')='N' and isnull(i.Hidden,'N')='N' FOR XML PATH('')), 1, 3, '') initiative_description
, STUFF((select '~|~' + r.name from app.ReportObjectDocTerms a inner join dbo.ReportObject r on a.ReportObjectID=r.ReportObjectID left outer join app.reportobject_doc d on d.reportobjectid = r.reportobjectid where a.TermId=t.TermId and isnull(d.hidden,'N')='N' FOR XML PATH('')), 1, 3, '') report_name
, STUFF((select '~|~' + r.DisplayTitle from app.ReportObjectDocTerms a inner join dbo.ReportObject r on a.ReportObjectID=r.ReportObjectID left outer join app.reportobject_doc d on d.reportobjectid = r.reportobjectid where a.TermId=t.TermId and r.DisplayTitle is not null and isnull(d.hidden,'N')='N' FOR XML PATH('')), 1, 3, '') linked_name
Expand Down

0 comments on commit 5c2d371

Please sign in to comment.