[jira] [Updated] (OFBIZ-3894) Refactor Email handling

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-3894) Refactor Email handling

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Malin updated OFBIZ-3894:
---------------------------------

    Attachment: OFBIZ-3894.patch

I Begun the refactoring email handling has scott suggest.

I realized in first step :
 * Create management emailTemplateSetting screen on ContentSetup Menu
 * Change data model ProductStoreEmailSetting
 * Add new Content entity : EmailTplSettingContent and EmailTplSettingContentType
 * Update ProductStoreEmailSetting service and screen.

To migrate data I propose :
 * Update data model with new enchancement
 * Run SQL  UPDATE product_store_email_setting SET email_type_enum_Id = email_type;
 ALTER TABLE product_store_email_setting DROP COLUMN email_type;

 Run service to create new emailTemplateSetting and associate to ProductStoreEmailSetting (not write yet)
   -> Run SQL by call entitySqlProcessor :
      UPDATE email_template_setting SET body_screen_location = (SELECT body_screen_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      UPDATE email_template_setting SET xslfo_attach_screen_location = (SELECT xslfo_attach_screen_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      UPDATE email_template_setting SET from_address = (SELECT from_address FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      UPDATE email_template_setting SET cc_address = (SELECT cc_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      UPDATE email_template_setting SET bcc_address = (SELECT bcc_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      UPDATE email_template_setting SET subject = (SELECT subject FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      UPDATE email_template_setting SET content_type = (SELECT content_type FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
      ALTER TABLE product_store_email_setting DROP COLUMN body_screen_location;
      ALTER TABLE product_store_email_setting DROP COLUMN xslfo_attach_screen_location;
      ALTER TABLE product_store_email_setting DROP COLUMN from_address;
      ALTER TABLE product_store_email_setting DROP COLUMN cc_address;
      ALTER TABLE product_store_email_setting DROP COLUMN bcc_address;
      ALTER TABLE product_store_email_setting DROP COLUMN subject;
      ALTER TABLE product_store_email_setting DROP COLUMN content_type;


If the following way it's good I continu with :
 * Change all services to use ProducStoreEmailSettingView instead of ProducStoreEmailSetting OR change sendEmailService with sendEmailFromTemplate
 * Add new screen to manage content email
 * Add new service to sendEmailFromContent
 * Update Content screen to give user possibility to edit template with context field selection

> Refactor Email handling
> -----------------------
>
>                 Key: OFBIZ-3894
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3894
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: ALL COMPONENTS
>    Affects Versions: SVN trunk
>            Reporter: BJ Freeman
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3894.patch
>
>   Original Estimate: 1,344h
>  Remaining Estimate: 1,344h
>
> with the addition of the Website for each component
> 1) create product store for Order entry, or use the B2C product store.
> 2) move the email  widgets from ecommerce to order compontent.
> 3) modify the seed data so that Order entry has it own emails from order component.this would be to add emails to
> note: as I go through the different items  this is turning out to be a bigger project than I first anticipated.
> so consider this so far just ideas.
> Maybe break down in to small tasks as I have time to do something.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

Re: [jira] [Updated] (OFBIZ-3894) Refactor Email handling

hans_bakker
Hi Nicolas,

good job, we can assist you implementing it. If you do not mind we will
review and commit the entity for the link to content....

Regards,
Hans

On Thu, 2011-08-11 at 16:29 +0000, Nicolas Malin (JIRA) wrote:

> [ https://issues.apache.org/jira/browse/OFBIZ-3894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Nicolas Malin updated OFBIZ-3894:
> ---------------------------------
>
>     Attachment: OFBIZ-3894.patch
>
> I Begun the refactoring email handling has scott suggest.
>
> I realized in first step :
>  * Create management emailTemplateSetting screen on ContentSetup Menu
>  * Change data model ProductStoreEmailSetting
>  * Add new Content entity : EmailTplSettingContent and EmailTplSettingContentType
>  * Update ProductStoreEmailSetting service and screen.
>
> To migrate data I propose :
>  * Update data model with new enchancement
>  * Run SQL  UPDATE product_store_email_setting SET email_type_enum_Id = email_type;
>  ALTER TABLE product_store_email_setting DROP COLUMN email_type;
>
>  Run service to create new emailTemplateSetting and associate to ProductStoreEmailSetting (not write yet)
>    -> Run SQL by call entitySqlProcessor :
>       UPDATE email_template_setting SET body_screen_location = (SELECT body_screen_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       UPDATE email_template_setting SET xslfo_attach_screen_location = (SELECT xslfo_attach_screen_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       UPDATE email_template_setting SET from_address = (SELECT from_address FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       UPDATE email_template_setting SET cc_address = (SELECT cc_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       UPDATE email_template_setting SET bcc_address = (SELECT bcc_location FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       UPDATE email_template_setting SET subject = (SELECT subject FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       UPDATE email_template_setting SET content_type = (SELECT content_type FROM  product_store_email_setting WHERE email_template_setting_id = email_Template_Setting.email_template_setting_id) && email_template_setting_id IN (SELECT email_template_setting_id FROM  product_store_email_setting);
>       ALTER TABLE product_store_email_setting DROP COLUMN body_screen_location;
>       ALTER TABLE product_store_email_setting DROP COLUMN xslfo_attach_screen_location;
>       ALTER TABLE product_store_email_setting DROP COLUMN from_address;
>       ALTER TABLE product_store_email_setting DROP COLUMN cc_address;
>       ALTER TABLE product_store_email_setting DROP COLUMN bcc_address;
>       ALTER TABLE product_store_email_setting DROP COLUMN subject;
>       ALTER TABLE product_store_email_setting DROP COLUMN content_type;
>
>
> If the following way it's good I continu with :
>  * Change all services to use ProducStoreEmailSettingView instead of ProducStoreEmailSetting OR change sendEmailService with sendEmailFromTemplate
>  * Add new screen to manage content email
>  * Add new service to sendEmailFromContent
>  * Update Content screen to give user possibility to edit template with context field selection
>
> > Refactor Email handling
> > -----------------------
> >
> >                 Key: OFBIZ-3894
> >                 URL: https://issues.apache.org/jira/browse/OFBIZ-3894
> >             Project: OFBiz
> >          Issue Type: Improvement
> >          Components: ALL COMPONENTS
> >    Affects Versions: SVN trunk
> >            Reporter: BJ Freeman
> >            Priority: Minor
> >             Fix For: SVN trunk
> >
> >         Attachments: OFBIZ-3894.patch
> >
> >   Original Estimate: 1,344h
> >  Remaining Estimate: 1,344h
> >
> > with the addition of the Website for each component
> > 1) create product store for Order entry, or use the B2C product store.
> > 2) move the email  widgets from ecommerce to order compontent.
> > 3) modify the seed data so that Order entry has it own emails from order component.this would be to add emails to
> > note: as I go through the different items  this is turning out to be a bigger project than I first anticipated.
> > so consider this so far just ideas.
> > Maybe break down in to small tasks as I have time to do something.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>        

--
Ofbiz on twitter: http://twitter.com/apache_ofbiz
Myself on twitter: http://twitter.com/hansbak
Antwebsystems.com: Quality services for competitive rates.

Reply | Threaded
Open this post in threaded view
|

Re: [jira] [Updated] (OFBIZ-3894) Refactor Email handling

Malin Nicolas
Thank Hans, I appreciate your return.


Le 13/08/2011 03:50, Hans Bakker a écrit :
> If you do not mind we will
> review and commit the entity for the link to content


--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/