Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello and good Day,
is there any best practices for how to migrate old issues/Items into a new state? We currently changed some of our Workflows/Types. We will added a new State and will remove a old one.
For Example:
- We like to add a new State "Active" which replace "Report_Active" to the type "Report". We will remove the old State "Report_Active" from the type. (It wasnt possible to rename "Report_Active" to "Active".)
What is the best way to migrate old items which are still in State "Report_Active" to "Active"? First change the State of the items to the new one and then remove the old state from the type? Or is it possible to to a batch migration afterwards?
Thank you very much
The easiest way to do a bulk state change is using a scheduled trigger.
1. Create a query that returns the items you want to change. Something like:
AND
-Type = <your type>
- State = Old State
2. Create a new Trigger. Type is "Scheduled", Frequency "Manual", Choose Query created in #1 and then go to the Assignment Tab and add State = <New State>. *Note: No trigger script is required!
3. Save the trigger and then right-click on it and do "Run Trigger". Baring any constraint violations, this should change all the states to the assigned value for all items returning in your query.
I would suggest you do the first round with a small subset of your results. (You could limit the results by adding a Create Date ranger filter) Once you've determined it works as expected you can expand the number of items returned by the Query. If you are updating thousands of items, you may want to start small with a few hundred items to get an idea of how long it and increase /decrease as needed.
Hope this helps!
-Andrew
Hello ascott,
thank you very much for your detailed answer.
I do have some questions about this procedure, may i ask them?
Thank you very much!
A scheduled assignment trigger will:
editissue --import will
The nice thing about a scheduled assignment trigger is that no scripting is required!
-Andrew
Sorry for the later answer.
Thank you very much ascott. We wrotea little java migration tool for our specific needs.