Page MenuHomePhabricator

While saving translation to CX database, set target URL only when it is changed to published status
Closed, ResolvedPublic1 Estimated Story Points

Description

Currently we update translation record in CX database for save and publish actions. For both, we update the translation URL. But translation URL update should happen only when publishing happens. Otherwise, we just calculate a URL and add to record- a URL that does not exist. But it is ok to update translation title.

If we add translation URL only when translation is published(first time and any time), we can use it as an indication of "translation one published" statistics calculation.

When status changes from published to draft, we should not empty the translation URL if present.

The stats query can then assume that, translation is published at least once, if status = 'published' OR translation URL is not NULL

Also see T89442

Event Timeline

santhosh raised the priority of this task from to Needs Triage.
santhosh updated the task description. (Show Details)
santhosh subscribed.
Arrbee edited a custom field.
Amire80 renamed this task from While saving translation to CX database, set target URL only when it is change to publish status to While saving translation to CX database, set target URL only when it is changed to published status.Mar 5 2015, 8:38 AM
Amire80 triaged this task as Medium priority.

Change 195505 had a related patch set uploaded (by Santhosh):
Database: Set targetURL only when status is published

https://gerrit.wikimedia.org/r/195505

Change 195505 merged by jenkins-bot:
Database: Set targetURL only when status is published

https://gerrit.wikimedia.org/r/195505

Change 195853 had a related patch set uploaded (by Santhosh):
Database: Make the target_url nullable for cx_translations table

https://gerrit.wikimedia.org/r/195853

Change 195853 merged by jenkins-bot:
Database: Make the target_url nullable for cx_translations table

https://gerrit.wikimedia.org/r/195853