Created attachment 753615 [details] server log Description of problem: When uploading a CLI script during creation of notification for an alert definition, exception is thrown to the server log and operation fails. This applies only to certain scenario (see repro steps) Version-Release number of selected component (if applicable): Version: 4.8.0-SNAPSHOT Build Number: ff37cd9 How reproducible: Always Steps to Reproduce: 1. create two repositories named i.e. "First" and "Second" (Administration->Repositories->Create New) 2.add a notification (cli script) to some alert definition: a. pick some resource (i.e. platform) b. go to Alerts->Definitions->New c. go to Notification tab->Add d. pick a Cli script as a notification sender e. pick "First" repository f. upload some js file, use version 1.0 -> notification is added successfully 3.try to add another notification: a. pick a Cli script as a notification sender b. pick "Second" repository c. try to upload the same file with the same version Actual results: Error uploading file [File] ERROR: duplicate key value violates unique constraint "rhq_package_version_idx" see attached server.log for complete exception Expected results: File is uploaded to the "Second" repository Additional info: It seems that the RHQ is not able to store the same file with the same version into two different repositories.