Incorrect version increment on translation process

Description

When having workflow enabled, if a translation is added and the document is pending, it will automatically increase the article version. This is because only draft is being checked, if it is draft the version will remain the same. More validations should be added.
The method is JournalArticleLocalServiceImpl.updateArticleTranslation

"if (!oldArticle.isDraft())" should be replaced by "if (!oldArticle.isDraft() && !oldArticle.isPending())"

To reproduce start Liferay with Kaleo Workflow.
Upload translation-fork-definition.xml. Apply translation workflow to Web Contents.
Add admin user to workflow roles
Create a web content, submit, accept workflow task, submit task for translation, accept spanish translation task, edit the web content, click "add a translation", type something and save the translation. While still in the Web Content editor you should see the version increased to 1.1 (and the document was still in pending state)

Environment

Vanilla Liferay EE 6.1.10 GA1 , Kaleo Workflow

Attachments

1

Activity

Show:

Matthew LeeAugust 17, 2012 at 3:56 PM

Committed on:
Portal 6.1.x CE GIT ID: 7796ec35453329a72977e9727f3fa0453e88093c.
Portal 6.2.x GIT ID: b4fcd668f0dceaa14656151916e37569090a1c56.

Fixed

Details

Assignee

Reporter

Branch Version/s

6.1.x

Backported to Branch

Committed

Git Pull Request

Components

Priority

Zendesk Support

Created July 24, 2012 at 3:43 AM
Updated June 24, 2023 at 3:54 PM
Resolved July 26, 2012 at 11:23 AM
Loading...