Experiments with Project Compares



Just recently, a question came up about customizing just a label.  So, I thought I would run a little experiment, and confirm how project compares work.

My plan is to go through compares and give a good background to how project compares work as well.

The actual question was: can you add a label to a delivered field without customizing the entire field.  I have seen how you can add just a label to a project, and the thought is to migrate just the label so that the field stays uncustomized.

So, here it goes…

Initial Definition Suite

To start with, I created a basic set of definitions: a field, a record, a page, and a component.  I didn’t go as far registering the component or building the record.  I just want some definitions that are related to each other.

Note: don’t forget to set the search record on your component.  You will need it to save; I used SKP_TEST_REC.  It just needs to save.

Knowing What’s In Your Project

Remember that you have to look at the “Upgrade” tab to see all of the objects in your project.  When you open the folder for each definition type, you’ll see a window with the list of definitions.

In the Definition lists, the Source and Target columns are what we are going to be interested in.  This shows us which objects are different before we import a new project such as a change package from an update.

Exporting the Project

Now, we need something to compare to.  So, let’s export the project.  You simply use the Tools > Copy Project > To File … menu.

Next, you must choose a path to save the file.  Also, make sure that you have all of the objects selected.

This creates a folder with the project name and with two files in it.  The XML file is the one that contains all of the information.

Running a Compare

Now, let’s run a compare.  Everything should be the same because we haven’t changed anything.  First, we need to use the Tools > Compare and Report > From File menu.

Next, we need to select our project in the File dialog:

Now, this won’t change any of the definitions because we are just doing a compare, but it will change the project definition.  So, we have to confirm that we want to overwrite just that.

Then, you should make sure all of the definition types are selected and hit compare.  You may want to check the “Options” button and look at the report filter, but that is outside the scope of this post.

Exploring the Compare Results

When it is done, you should get one report for each definition type.  Our reports should be empty (0 items) at this point since everything is the same.

Notice that now, the project items show the compare results as well:

You can also query the results from the database by using the PSPROJECTITEM table.

Making a Change

Now, let’s make a change so that we see a difference in our compare report.  I am adding a new label to the field…

(make sure to save)

Then, I will run the compare again:

Amazingly enough, the compare report still shows blank.  I guess that is because the label that I changed is more like a subdefinition.

The project does reflect the difference:

Also, you can see it in the PSPROJECTITEM table:

Now, let’s make a change that will show up on the compare reports.  I am going to change the field length because that is on the Field definition itself.

My compare report shows a change now!

The project shows the difference in both the field and the label:

And, here’s what it looks like from the database:

Delivered Versus Customized

Next, noticed the asterisks in the project Source and Target columns.  They mean that this field has been customized.

How does it know?  It is tracked by the Last Update User.  You can view that on the definition’s properties.  If I open up the field and go to the properties, you’ll see that it says “PS” changed the field last.

Let’s compare that to the EMPLID field that is delivered by PeopleSoft.  I haven’t touched this field (for good reason).  When the last update user is “PPLSOFT”, that means it is delivered and unchanged.

Just for experimentation, let’s trick the system into thinking that my field is delivered.  I’ll update the User Stamp behind the scenes.  In real life, you shouldn’t be updating these tables, but this is an experiment.

Now, the field looks delivered.

Notice, the difference in the asterisks on the compare report.

And, the project definition shows the asterisks as well.

Finally, there’s the view from the database:

The one thing that I noticed is that delivered/customized must not be tracked at the label level.  When I changed the user for the field, both the label and the field showed delivered in the compare.

Just a Label in a Project

Now, here’s the real experiment.  What if I put just a label in a project?

First, I need to add a new label:

Make sure to save your field.

Now, I want a new project…

This time, I am using the Insert Definitions Into Project dialog (Ctrl + F7) to place the field in the project.  I also selected the Field Labels from the related definitions tab.

Now, I remove all but the one new label from the project.

And, save the project…

And, export the project to file…

Now, before I compare, I want to reset things back to before the export.  So, let me remove that new label:

Just for double checking, let me also change the field a little.  I’ll update the Field Length again:

Then, I reset the field back to delivered.

Now, I can do a compare and see what would happen:

So, the compare shows that the label is customized in the file project and absent in the system currently.

Now, let me actually copy the change in.  I want to use the project definition from the File.  That way the compare results don’t impact the copy.

And, copy it in…

It did not update the the field — still says a length of one.  But, it did add the new label.

And, it did not mark the field as customized:

So, it did what I wanted it to: just updated the label.

Up for Discussion

First, do you see anything I did wrong?  Please comment any thoughts on what I did and tried.

The big question is: Given this, would you add a custom label to a delivered field in your system?  Please comment your thoughts and opinions!

My thought is that it is still a customization that needs to be tracked.  As such, I see value in finding another way to accomplish this goal rather than changing a delivered field.  It is minimal impact and arguably not customizing the field, but I still think there is value in finding another way.

Your thoughts?


Share