Compare commits

...

2 Commits

Author SHA1 Message Date
semantic-release-bot 347b0f9065 chore(release): 6.5.1 [skip ci]
## [6.5.1](https://git.datacontroller.io/dc/dc/compare/v6.5.0...v6.5.1) (2024-02-02)

### Bug Fixes

* ensuring submitter email can be pulled from mpe_emails ([eac0104](eac0104d7a))
2024-02-02 11:35:49 +00:00
zmaj eac0104d7a fix: ensuring submitter email can be pulled from mpe_emails
Release / Build-production-and-ng-test (push) Successful in 4m46s Details
Release / Build-and-test-development (push) Successful in 8m34s Details
Release / release (push) Successful in 6m51s Details
2024-02-02 11:20:43 +00:00
4 changed files with 68 additions and 10 deletions

View File

@ -1,3 +1,10 @@
## [6.5.1](https://git.datacontroller.io/dc/dc/compare/v6.5.0...v6.5.1) (2024-02-02)
### Bug Fixes
* ensuring submitter email can be pulled from mpe_emails ([eac0104](https://git.datacontroller.io/dc/dc/commit/eac0104d7aebaf98ff1d1c504c1ce3b25d4a0ce8))
# [6.5.0](https://git.datacontroller.io/dc/dc/compare/v6.4.0...v6.5.0) (2024-01-26)

View File

@ -1,6 +1,6 @@
{
"name": "dcfrontend",
"version": "6.5.0",
"version": "6.5.1",
"description": "Data Controller",
"devDependencies": {
"@saithodev/semantic-release-gitea": "^2.1.0",

View File

@ -42,3 +42,42 @@ create table &dclib..mpe_xlmap_info(
tx_to num not null,
constraint pk_mpe_xlmap_info
primary key(tx_from,XLMAP_ID));
/* add mpe_tables entries */
insert into &dclib..mpe_tables
set tx_from=0
,tx_to='31DEC5999:23:59:59'dt
,libref="&dclib"
,dsn='MPE_XLMAP_INFO'
,num_of_approvals_required=1
,loadtype='TXTEMPORAL'
,var_txfrom='TX_FROM'
,var_txto='TX_TO'
,buskey='XLMAP_ID'
,notes='Docs: https://docs.datacontroller.io/complex-excel-uploads'
,post_edit_hook='services/hooks/mpe_xlmap_info_postedit'
;
insert into &dclib..mpe_tables
set tx_from=0
,tx_to='31DEC5999:23:59:59'dt
,libref="&dclib"
,dsn='MPE_XLMAP_RULES'
,num_of_approvals_required=1
,loadtype='TXTEMPORAL'
,var_txfrom='TX_FROM'
,var_txto='TX_TO'
,buskey='XLMAP_ID XLMAP_RANGE_ID'
,notes='Docs: https://docs.datacontroller.io/complex-excel-uploads'
,post_edit_hook='services/hooks/mpe_xlmap_rules_postedit'
;
insert into &dclib..mpe_tables
set tx_from=0
,tx_to='31DEC5999:23:59:59'dt
,libref="&dclib"
,dsn='MPE_XLMAP_DATA'
,num_of_approvals_required=1
,loadtype='UPDATE'
,buskey='LOAD_REF XLMAP_ID XLMAP_RANGE_ID ROW_NO COL_NO'
,notes='Docs: https://docs.datacontroller.io/complex-excel-uploads'
;

View File

@ -46,7 +46,7 @@
/* get users TO which the email should be sent */
proc sql noprint;
create table users as select distinct a.alert_user,
create table work.users as select distinct a.alert_user,
b.user_displayname,
b.user_email
from &mpelib..mpe_alerts
@ -58,16 +58,26 @@ create table users as select distinct a.alert_user,
and a.alert_lib in ("&alert_lib","*ALL*")
and a.alert_ds in ("&alert_ds","*ALL*");
%local isThere;
/* ensure the submitter is included on the email */
%local isThere userdisp user_eml;
%let isThere=0;
select count(*) into: isThere from &syslast where alert_user="&from_user";
%if &isThere>0 %then %do;
insert into &syslast set alert_user="&from_user";
%if &isThere=0 %then %do;
select user_displayname, user_email
into: userdisp trimmed, :user_eml trimmed
from &mpelib..mpe_emails
where &dc_dttmtfmt. lt tx_to
and user_name="&from_user";
insert into work.users
set alert_user="&from_user"
,user_displayname="&userdisp"
,user_email="&user_eml";
%end;
/* if no email / displayname is provided, then extract from metadata */
data emails;
set users;
data work.emails;
set work.users;
length emailuri uri text $256; call missing(emailuri,uri); drop emailuri uri;
/* get displayname */
@ -92,11 +102,13 @@ data emails;
end;
/* only keep valid emails */
if index(user_email,'@') ;
/* dump contents for debugging */
if _n_<21 then putlog (_all_)(=);
run;
%local emails;
proc sql noprint;
select user_email into: emails separated by '" "' from emails;
select quote(trim(user_email)) into: emails separated by ' ' from work.emails;
/* exit if nobody to email */
%if %mf_getattrn(emails,NLOBS)=0 %then %do;
@ -110,7 +122,7 @@ data _null_;
put optname '=' setting;
run;
filename __out email ("&emails")
filename __out email (&emails)
subject="Table &alert_lib..&alert_ds has been &alert_event";
%local SUBMITTED_TXT;
@ -172,4 +184,4 @@ filename __out email ("&emails")
filename __out clear;
%mend mpe_alerts ;
%mend mpe_alerts ;