Author: jleroux
Date: Tue May 10 17:12:05 2016
New Revision: 1743230
URL: http://svn.apache.org/viewvc?rev=1743230&view=rev
Log:
A patch from Ingo Wolfmayr for "Update empty blog article text does not work"
https://issues.apache.org/jira/browse/OFBIZ-7062
When creating a blog-entry with empty article text, it is not possible to add
update the article. Content entry is created but not assigned to contentId of
blog-entry. The attached patch fixes this.
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml?rev=1743230&r1=1743229&r2=1743230&view=diff
==============================================================================
---
ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
(original)
+++
ofbiz/trunk/applications/content/script/org/ofbiz/content/blog/BlogServices.xml
Tue May 10 17:12:05 2016
@@ -150,19 +150,21 @@
<!-- new article text -->
<if-empty field="articleText">
<if-not-empty field="parameters.articleData">
+ <set field="ownerContentId"
from-field="parameters.blogContentId"/>
+ <set field="contentAssocTypeId" value="SUB_CONTENT"/>
+ <set field="contentIdFrom" from-field="contentId"/>
<set field="createText.dataResourceTypeId"
value="ELECTRONIC_TEXT"/>
<set field="createText.contentPurposeTypeId" value="ARTICLE"/>
<set field="createText.dataTemplateTypeId" value="NONE"/>
- <set field="createText.mapKey" value="MAIN"/>
- <set field="createSummary.ownerContentId"
from-field="parameters.contentId"/>
- <set field="createSummary.contentName"
from-field="parameters.contentName" default-value="${contentName}"/>
- <set field="createSummary.description"
from-field="parameters.description" default-value="${description}"/>
- <set field="createSummary.statusId"
from-field="parameters.statusId" default-value="${statusId}"/>
- <set field="createSummary.contentAssocTypeId"
value="SUB_CONTENT"/>
+ <set field="createText.mapKey" value="ARTICLE"/>
+ <set field="createText.ownerContentId"
from-field="ownerContentId"/>
+ <set field="createText.contentName"
from-field="parameters.contentName"/>
+ <set field="createText.description"
from-field="parameters.description"/>
+ <set field="createText.statusId"
from-field="parameters.statusId"/>
+ <set field="createText.contentAssocTypeId"
from-field="contentAssocTypeId"/>
<set field="createText.textData"
from-field="parameters.articleData"/>
<set field="createText.contentIdFrom"
from-field="contentIdFrom"/>
<set field="createText.partyId"
from-field="userLogin.partyId"/>
- <log level="always" message="calling createTextContent with
map: ${createText}"/>
<call-service service-name="createTextContent"
in-map-name="createText"/>
</if-not-empty>
</if-empty>