Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add batch_id param support for create errata function #249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions errata_tool/erratum.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def update(self, **kwargs):
if 'solution' in kwargs:
self.solution = self.fmt(kwargs['solution'])
self._update = True
if 'batch_id' in kwargs:
self.batch_id = kwargs['batch_id']
self._update = True


def __init__(self, **kwargs):

Expand Down Expand Up @@ -840,6 +844,8 @@ def _write(self):
pdata['advisory[assigned_to_email]'] = self.qe_email
if self.qe_group is not None and self.qe_group != '':
pdata['advisory[quality_responsibility_name]'] = self.qe_group
if self.batch_id is not None:
pdata['batch[id]'] = self.batch_id

if self.synopsis is None:
raise ErrataException("Can't write erratum without synopsis")
Expand Down
2 changes: 1 addition & 1 deletion errata_tool/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _fixture(self):
"""Return path to our static fixture file. """
fdir = os.path.join(FIXTURES_DIR, 'errata.devel.redhat.com/')
filename = self._url_with_params.replace(
'https://errata.devel.redhat.com/', fdir)
'https://errata.devel.redhat.com/', fdir).replace('https://errata.stage.engineering.redhat.com/', fdir)
# If we need to represent this API endpoint as both a directory and a
# file, check for a ".body" file.
if os.path.isdir(filename):
Expand Down
Loading