Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Upgrade Script to Convert Language Variables to Locale Content Items #27703

Closed
damen-dotcms opened this issue Feb 23, 2024 · 3 comments · Fixed by #27965
Closed

Create Upgrade Script to Convert Language Variables to Locale Content Items #27703

damen-dotcms opened this issue Feb 23, 2024 · 3 comments · Fixed by #27965

Comments

@damen-dotcms
Copy link
Contributor

damen-dotcms commented Feb 23, 2024

Parent Issue

#25603

Task

Create Upgrade Script to Convert Language Variables to Content Items

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

Acceptance Criteria

  • We have the Language Variables under Languages, but we also have Language Variables as Content Items. We need to convert all Language Variables to Content Items.
  • We need to convert any legacy Language Variables to Content Items. This should be done as an upgrade task.

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@damen-dotcms
Copy link
Contributor Author

Copy paste issue in the original description. Fixed now.

@fabrizzio-dotCMS fabrizzio-dotCMS self-assigned this Mar 6, 2024
fabrizzio-dotCMS added a commit that referenced this issue Mar 11, 2024
fabrizzio-dotCMS added a commit that referenced this issue Mar 14, 2024
fabrizzio-dotCMS added a commit that referenced this issue Mar 14, 2024
…d this as a DataTask once the lang variables portlet is updated
fabrizzio-dotCMS added a commit that referenced this issue Mar 14, 2024
@fabrizzio-dotCMS
Copy link
Contributor

fabrizzio-dotCMS commented Mar 14, 2024

Not to QA:
The migration script is added as an upgrade task of type DataTask.
DataTasks are registered in a table called data_version And these Tasks get applied only on long-running environments being updated. This means you won't see these getting applied on a fresh install. To be able to test this you will need to make some tweaks in the database to simulate the "customer environment" situation.
To force the task to be executed remove entry 240306 from the data_version table. Then restart the server.

Now the task will look for files present in the folder /assets/messages/
here's an example of what these files might look like
messages.zip
It will only import the file if the language already exists in the system and it matches the file name.

Important: QA is blocked on this task because this task won't be enabled until the work in the front end is completed. This is to prevent customers from applying this script and continuing to use the old portlet which continues to save LanguageVariables as resource bundles and not content.

@nollymar
Copy link
Contributor

Internal QA: this change will be tested when this card is completed.

github-merge-queue bot pushed a commit that referenced this issue Mar 16, 2024
* #27703 Langvars migratation script

* #27703 save point

* #27703 UT should able deal with non-exising ct

* #27703 cleaning sample file not used by the test

* #27703 reverting changes on TaskLocatorUtil

* #27703 fixing comment grammar

* #27703 fix in path after testing in dotCMS. Adding todo comment to add this as a DataTask once the lang variables portlet is updated

* #27703 doc

* #27703 reverting changes in  TaskLocatorUtil

* #27703 doc
@damen-dotcms damen-dotcms changed the title Create Upgrade Script to Convert Language Variables to Content Items Create Upgrade Script to Convert Language Variables to Locale Content Items May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants