Had a discussion with Farasath/Kasun and could find a way to add a new template.
The JSP which lists the email templates picks only the templates which has been added to the org.wso2.carbon.identity.mgt.dto.EmailTemplateDTO. Therefore in order to show a newly added template in the email template page, an entry for the new template should be added at [1]. [1] https://github.com/wso2/carbon-identity/blob/master/components/identity-mgt/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/config/EmailConfigTransformer.java#L54 Regards, *Lasantha Samarakoon* | Software Engineer WSO2, Inc. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 (71) 214 1576 Email: [email protected] Web: www.wso2.com lean . enterprise . middleware On Thu, Aug 11, 2016 at 12:49 PM, Kasun Bandara <[email protected]> wrote: > Hi Lasantha, > > Yes. Only the email templates types originally placed at > email-admin-config.xml will be populated at the UI level. As you stated > only when you save the template, it get persists in the registry. The > corresponding email-template content persisted in the registry will be > retrieved through [1]. > > But unfortunately as i stated with IS 5.1.0, there are limitations in the > UI and service implementation level when retrieving the content, hence it's > not viable to populate the email templates dynamically you add through the > registry. > > Thanks, > Kasun. > > [1] https://github.com/wso2/carbon-identity/blob/v5.0.7/ > components/identity-mgt/org.wso2.carbon.identity.mgt/src/ > main/java/org/wso2/carbon/identity/mgt/services/ > AccountCredentialMgtConfigService.java#L75 > > > On Thu, Aug 11, 2016 at 12:00 PM, Lasantha Samarakoon <[email protected]> > wrote: > >> Hi Kasun, >> >> Thanks for the info. Just to clarify, as it seems in a fresh pack the >> only place that keeps email templates is the email-admin-config.xml. So I >> assume that when the email templates page is getting loaded it selectively >> loads the templates from the config file. Is that correct? Only when you >> save the template, the registry resource get created [1]. >> >> Unfortunately we have to stick to the IS 5.1.0 with this requirement. As >> it seems like the final template is taken from the registry resource not >> from the config file. So in that case the only option will to modify >> content using registry browser. >> >> [1] https://wso2.org/jira/browse/IDENTITY-4547 >> >> Regards, >> >> *Lasantha Samarakoon* | Software Engineer >> WSO2, Inc. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 (71) 214 1576 >> Email: [email protected] >> Web: www.wso2.com >> >> lean . enterprise . middleware >> >> On Thu, Aug 11, 2016 at 11:27 AM, Kasun Bandara <[email protected]> wrote: >> >>> Hi, >>> >>> This is actually a limitation in IS 5.0.0 & IS 5.1.0. This issue [1] has >>> been resolved from IS 5.3.0-M4 onwards, where you can Add/Edit/Delete new >>> email templates from the UI itself. Please find the latest released IS >>> 5.3.0-M4 from [2]. >>> >>> >>> Thanks, >>> Kasun. >>> >>> >>> [1] https://wso2.org/jira/browse/IDENTITY-4816 >>> <https://www.google.com/url?q=https%3A%2F%2Fwso2.org%2Fjira%2Fbrowse%2FIDENTITY-4816&sa=D&sntz=1&usg=AFQjCNF9ieRoAhnS9vO_f-H4MuEXnKvJkg> >>> >>> [2] https://github.com/wso2/product-is/releases/tag/v5.3.0-m4 >>> >>> >>> On Thu, Aug 11, 2016 at 11:16 AM, Johann Nallathamby <[email protected]> >>> wrote: >>> >>>> [adding KasunB and Farasath] >>>> >>>> On Thu, Aug 11, 2016 at 11:04 AM, Lasantha Samarakoon < >>>> [email protected]> wrote: >>>> >>>>> Hi all, >>>>> >>>>> In IS 5.1.0, I have added a new email template by editing the >>>>> email-admin-config.xml. But when I check that on the MC -> Configure -> >>>>> Email templates page, the new templates is not getting listed. I have >>>>> added >>>>> a new property with the new email template in >>>>> /_system/config/identity/config/emailTemplate >>>>> as well, but still the problem not resolved. >>>>> >>>>> Anything else I need to do to make this work? >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> *Lasantha Samarakoon* | Software Engineer >>>>> WSO2, Inc. >>>>> #20, Palm Grove, Colombo 03, Sri Lanka >>>>> Mobile: +94 (71) 214 1576 >>>>> Email: [email protected] >>>>> Web: www.wso2.com >>>>> >>>>> lean . enterprise . middleware >>>>> >>>> >>>> >>>> >>>> -- >>>> Thanks & Regards, >>>> >>>> *Johann Dilantha Nallathamby* >>>> Technical Lead & Product Lead of WSO2 Identity Server >>>> Governance Technologies Team >>>> WSO2, Inc. >>>> lean.enterprise.middleware >>>> >>>> Mobile - *+94777776950* >>>> Blog - *http://nallaa.wordpress.com <http://nallaa.wordpress.com>* >>>> >>> >>> >>> >>> -- >>> Kasun Bandara >>> *Software Engineer* >>> Mobile : +94 (0) 718 338 360 >>> <%2B94%20%280%29%20773%20451194> >>> [email protected] <[email protected]> >>> >> >> > > > -- > Kasun Bandara > *Software Engineer* > Mobile : +94 (0) 718 338 360 > <%2B94%20%280%29%20773%20451194> > [email protected] <[email protected]> >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
