Red Hat Bugzilla – Bug 642519
errata.create fails with same keywords
Last modified: 2011-03-17 10:13:09 EDT
Description of problem:
Call errata.create and specify one keyword several time. Call fails.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use keywords = ['tml-kw1', 'tml-kw2', 'tml-kw1', 'tml-kw2', 'tml-kw3']
in the errata.create call
2010-10-13 10:21:54,146 [TP-Processor3] ERROR com.redhat.rhn.frontend.xmlrpc.BaseHandler - Caused by:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.redhat.rhn.domain.errata.impl.UnpublishedKeyword#tml-kw1]
Our schema supports only a unique keyword for an erratum. Adding check - not to associate two same keywords with an erratum
Fixed in spacewalk: a03aed255654a38d4b08945f2a2f5ffe73d6a5a5
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
rhn_err_keywordtmp_eid_uq constrain doesn't allow same keywords associated with a single erratum
errata.create API fails with NonUniqueObjectException, when setting same keywords
Duplicates will be removed from the erratum keyword list before storing them.
Only one keyword will be stored, when setting keyword dupes. No Traceback.
Taking QA contact. Should be easy to automate.
Changing to Verified.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.