PeopleTools | Ensuring all objects in the project are included in a project copy
A. The Upgrade Trap
While many PeopleSoft developers are somewhat aware of the ‘Upgrade’ tab in App Designer, there is often confusion as to how upgrade flags work in practice. The ‘Upgrade’ tab is the second of the two tabs on the lower, left-hand side of App Designer:
Double-clicking on any of the object types will give you a full list of project objects for that type. For instance, here’s a typical display in regards to record objects:
When it comes to migrating a project to another database, many developers don’t look at the upgrade flags at all, preferring to rely on the ‘compare’ to make sure the upgrade fields are set correctly. Once the compare has been completed, there is a temptation to do the copy straightaway, without checking to see what the compare has done.
It’s important to verify the results of the compare every time it’s run, even for a project you’re familiar with. As a bare minimum, the compare report highlights differences between the two databases, possibly revealing an unexpected change by another developer.
In many cases, the compare will be correct and no further action is required. However, in some cases, the compare does not set the upgrade flags correctly, meaning objects will not be copied when you want them to be copied. If you want to make sure a particular object is copied, the following three fields must be set in the upgrade tab:
• The Action field (third last column) needs to be set to ‘Copy’
• The Upgrade checkbox (second last column) needs to be ticked
• The Done checkbox (last column) should not be ticked
The screen shot displayed earlier (with the record views) is a good example of what the ‘upgrade’ tab should look like if all objects must be copied.
B. Copying an Entire Project
The upgrade flags make a big difference when wanting to copy all objects in the project. This is typically the case when you wish to copy an entire project to file, perhaps as a back-up.
Before doing the copy, every object in the project must have its upgrade values set to the values indicated above (Action of ‘Copy’ / Upgrade ticked / Done not ticked). If these fields are incorrectly set before the copy, the resulting file will not contain all project objects.
The upgrade flags can be set in three ways: (i) by manual update, (ii) by comparing to a ‘demo’ database, or (iii) by running an SQL update. Each method will be considered in turn.
C. Manually Setting the Upgrade Flags
If your project is relatively small, you can go through each of the upgrade grids yourself, setting the fields as desired. Fortunately, you do not need to do this for every item. App Designer provides functionality to assist with setting the upgrade fields in bulk.
(i) Action Field: open up any of the object grids in the ‘Upgrade’ tab. Right mouse click on the grid and then select ‘Set Action for Project’ followed by ‘Copy’. All project objects will then be set to ‘Copy’.
(ii) Upgrade: open up any of the object grids in the ‘Upgrade’ tab. Highlight all the objects in the grid by clicking the empty space in the top left-hand corner of the grid, as indicated in the screen shot below.
With all objects highlighted, right mouse click anywhere on the grid and select ‘Tag for Upgrade’. This sets the Upgrade checkbox in the current grid only to ‘Y’. Therefore, you will have to repeat this step for every object type in the project
(iii) Done: open up any of the object grids in the ‘Upgrade’ tab. Right mouse click on the grid and then select ‘Reset Project Done Flags’.
After performing these three steps, the entire project should be marked for upgrade. You can then proceed with the ‘Copy’ as normal.
D. Compare to Demo Database
If your project only contains custom objects – or mostly custom objects – you can compare the project to a database in which the project does not currently exist. A ‘demo’ database is a good candidate for this, as this should only contain Oracle-delivered objects.
Once the compare has run, all objects will be marked for upgrade, so the ‘Copy to File’ can now go ahead as normal. If the project contains a few Oracle delivered fields, these may need to be manually set for upgrade – refer to Section C above.
E. SQL Script
Finally, the SQL update statement below provides a quick way to mark all fields in the project for upgrade. This should not be relied up too extensively, as the compare report is still useful for other reasons (such as checking for differences between databases). However if you’re copying a large project to file, a quick-and-dirty update will save a bit of time.
Before running the update statement, make sure you save and close your project in App Designer.
update psprojectitem set upgradeaction = 0, takeaction = 1, copydone = 0 where projectname = 'PROJECT_NAME';