When a user is trying to create a package the following error message is generated:
E03020005: The package name PackageName, has already been used in this project.
Harvest Software Change Manager all versions and platforms
When setting up the "Create Package" process for a particular project, the Administrator can choose to have the package names automatically generated with their selected template and sequential numbers. This setting will be in the Create Package process properties window on the "Defaults" tab. Also included on that tab is a checkbox that controls whether the automatically created package name can be overridden by the user when creating a package.
This error can be caused if a user overrides the automatically generated package name and selects a new package number that is higher than the automatically generated one. For example, if the automatically generated package name is "MR- 00050" and the user overrides that name and chooses "MR- 00150", this error can happen when Harvest tries to automatically generate package "MR- 00150".
First, verify if the package exists by running this query on the Harvest Database
SELECT HARENVIRONMENT.ENVIRONMENTNAME,
HARSTATE.STATENAME,
HARPACKAGE.PACKAGENAME
FROM HARENVIRONMENT
INNER JOIN HARPACKAGE ON HARENVIRONMENT.ENVOBJID = HARPACKAGE.ENVOBJID
LEFT JOIN HARSTATE ON HARPACKAGE.STATEOBJID = HARSTATE.STATEOBJID
WHERE HARENVIRONMENT.ENVIRONMENTNAME = '<project name here>'
AND HARPACKAGE.PACKAGENAME = '<package_name_from_the_error>';
Second, verify if the next package number is the next number sequentially
SELECT NAMECOUNTER,
NAMEFORMAT
FROM HARPACKAGENAMEGEN
WHERE NAMEFORMAT LIKE '<PackageName>%';
This will tell us if the "next package number" (in the NAMECOUNTER column) is higher than the number in the package name causing the error. To correct this problem, please contact Support for help in developing the SQL to directly update the database with a new "next package number",
To disable this behavior, you can check the "Prevent Name Change During Package Creation" box
More information about creating the Create Package process and how to create the package name templates can be found here: Define Lifecycle Processes - Define a Create Package Process