[jira] [Commented] (OFBIZ-9303) Remove hard-coded success/error message variables set in service output

2017-05-16 Thread Deepak Dixit (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16012732#comment-16012732
 ] 

Deepak Dixit commented on OFBIZ-9303:
-

Thanks Devanshu for confirmation, your patch has been committed at 
framework-trunk at r#1795340


> Remove hard-coded success/error message variables set in service output 
> 
>
> Key: OFBIZ-9303
> URL: https://issues.apache.org/jira/browse/OFBIZ-9303
> Project: OFBiz
>  Issue Type: Improvement
>  Components: ALL COMPONENTS
>Affects Versions: Trunk
>Reporter: Devanshu Vyas
>Assignee: Deepak Dixit
>Priority: Minor
> Attachments: OFBIZ-9303.patch
>
>
> I found that certain services in OFBiz set error/success message values in o 
> hard-codedly like:
> {code}
> result.put("errorMessage", errMsg);
> result.put("successMessage", message);
> {code}
> I think it shouldn't be set like this, as we have constants in ModelService 
> class for this purpose. 
> ModelService.ERROR_MESSAGE/ModelService.SUCCESS_MESSAGE should be used to set 
> the error and success messages, for in case we want to change the constant's 
> value, no services will be affected.
> {code}
> result.put(ModelService.ERROR_MESSAGE, errMsg);
> result.put(ModelService.SUCCESS_MESSAGE, errMsg);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OFBIZ-9303) Remove hard-coded success/error message variables set in service output

2017-04-27 Thread Devanshu Vyas (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15986263#comment-15986263
 ] 

Devanshu Vyas commented on OFBIZ-9303:
--

Hi Deepak,

I checked, there are no instances to fixed in the plugins. I think you are 
referring to code such as.. 
{code}
result = ServiceUtil.returnError(result.get("errorMessage").toString());
{code}
This ticket is solely for the purpose of correcting the 
{code}
result.put("errorMessage", errMsg);
{code}
I will be creating a separate ticket for this after the current effort. Thanks 
for reminding me, I almost forgot :)

And I haven't got the chance to look at the missing occurrences after patch 
applied, will check and update the ticket accordingly. 

> Remove hard-coded success/error message variables set in service output 
> 
>
> Key: OFBIZ-9303
> URL: https://issues.apache.org/jira/browse/OFBIZ-9303
> Project: OFBiz
>  Issue Type: Improvement
>  Components: ALL COMPONENTS
>Affects Versions: Trunk
>Reporter: Devanshu Vyas
>Assignee: Deepak Dixit
>Priority: Minor
> Attachments: OFBIZ-9303.patch
>
>
> I found that certain services in OFBiz set error/success message values in o 
> hard-codedly like:
> {code}
> result.put("errorMessage", errMsg);
> result.put("successMessage", message);
> {code}
> I think it shouldn't be set like this, as we have constants in ModelService 
> class for this purpose. 
> ModelService.ERROR_MESSAGE/ModelService.SUCCESS_MESSAGE should be used to set 
> the error and success messages, for in case we want to change the constant's 
> value, no services will be affected.
> {code}
> result.put(ModelService.ERROR_MESSAGE, errMsg);
> result.put(ModelService.SUCCESS_MESSAGE, errMsg);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OFBIZ-9303) Remove hard-coded success/error message variables set in service output

2017-04-26 Thread Deepak Dixit (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15985333#comment-15985333
 ] 

Deepak Dixit commented on OFBIZ-9303:
-

Hi Devanshu,

Could you please upload patch for plugins as well?
Also I found some occurrences after patch applied,  could you please update 
that as well. 

> Remove hard-coded success/error message variables set in service output 
> 
>
> Key: OFBIZ-9303
> URL: https://issues.apache.org/jira/browse/OFBIZ-9303
> Project: OFBiz
>  Issue Type: Improvement
>  Components: ALL COMPONENTS
>Affects Versions: Trunk
>Reporter: Devanshu Vyas
>Assignee: Deepak Dixit
>Priority: Minor
> Attachments: OFBIZ-9303.patch
>
>
> I found that certain services in OFBiz set error/success message values in o 
> hard-codedly like:
> {code}
> result.put("errorMessage", errMsg);
> result.put("successMessage", message);
> {code}
> I think it shouldn't be set like this, as we have constants in ModelService 
> class for this purpose. 
> ModelService.ERROR_MESSAGE/ModelService.SUCCESS_MESSAGE should be used to set 
> the error and success messages, for in case we want to change the constant's 
> value, no services will be affected.
> {code}
> result.put(ModelService.ERROR_MESSAGE, errMsg);
> result.put(ModelService.SUCCESS_MESSAGE, errMsg);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (OFBIZ-9303) Remove hard-coded success/error message variables set in service output

2017-04-05 Thread Michael Brohl (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-9303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15957129#comment-15957129
 ] 

Michael Brohl commented on OFBIZ-9303:
--

Thanks for the initative, Devanshu!

> Remove hard-coded success/error message variables set in service output 
> 
>
> Key: OFBIZ-9303
> URL: https://issues.apache.org/jira/browse/OFBIZ-9303
> Project: OFBiz
>  Issue Type: Improvement
>  Components: ALL COMPONENTS
>Affects Versions: Trunk
>Reporter: Devanshu Vyas
>Priority: Minor
>
> I found that certain services in OFBiz set error/success message values in o 
> hard-codedly like:
> {code}
> result.put("errorMessage", errMsg);
> result.put("successMessage", message);
> {code}
> I think it shouldn't be set like this, as we have constants in ModelService 
> class for this purpose. 
> ModelService.ERROR_MESSAGE/ModelService.SUCCESS_MESSAGE should be used to set 
> the error and success messages, for in case we want to change the constant's 
> value, no services will be affected.
> {code}
> result.put(ModelService.ERROR_MESSAGE, errMsg);
> result.put(ModelService.SUCCESS_MESSAGE, errMsg);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)