Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 827050 Details for
Bug 909480
Automatically create "cloned" bugs in "Layered Product Common for RHEL 6"
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
proposed patch
py-bz-cloning-7.patch (text/plain), 4.48 KB, created by
Martin Cermak
on 2013-11-21 08:49:23 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Martin Cermak
Created:
2013-11-21 08:49:23 UTC
Size:
4.48 KB
patch
obsolete
>diff --git a/bugzilla/base.py b/bugzilla/base.py >index c2b9295..19e5b7d 100644 >--- a/bugzilla/base.py >+++ b/bugzilla/base.py >@@ -855,6 +855,100 @@ class BugzillaBase(object): > raise NotImplementedError("This bugzilla instance does not support " > "modifying bugs") > >+ def clonebug(self, bugid, product=None, component=None, version=None): >+ '''Clone this bug similarly as one can do it in the webui''' >+ origbug = self.getbug(bugid) >+ clone_message = '+++ This bug was initially created ' >+ clone_message += 'as a clone of Bug #%s +++\n\n' >+ clone_message = clone_message % (origbug.id) >+ isprivate = False >+ isadditional = False >+ for rec in origbug.longdescs: >+ if isadditional: >+ clone_message += '\n--- Additional comment from ' >+ clone_message += rec['author'] >+ clone_message += ' on ' >+ clone_message += str(rec['time']) >+ clone_message += '\n\n' >+ if 'extra_data' in rec.keys(): >+ clone_message += '\n\n*** This bug has been marked ' >+ clone_message += 'as a duplicate of bug %s ***\n' >+ clone_message += clone_message % (rec['extra_data']) >+ else: >+ clone_message += rec['text'] + "\n" >+ isadditional = True >+ if rec['is_private'] == 1: >+ isprivate = True >+ cc = origbug.cc >+ cc.append(origbug.reporter) >+ depends_on = str(origbug.bug_id) + ' ' >+ depends_on += ' '.join([str(i) for i in origbug.dependson]) >+ new_product = product >+ if new_product is None: >+ new_product = origbug.product >+ new_component = component >+ if new_component is None: >+ new_component = origbug.component >+ new_version = version >+ new_target_release = None >+ if new_version is None and new_product != origbug.product: >+ releases = self._proxy.Product.get({ >+ 'names': new_product, >+ 'include_fields': ['releases']}) >+ prodinfo = releases['products'][0]['releases'] >+ versions = [p['name'] for p in prodinfo] >+ new_version = versions[-1] >+ elif new_version is None: >+ new_target_release = origbug.target_release >+ new_version = origbug.version >+ kwargs = { >+ 'product': new_product, >+ 'component': new_component, >+ 'version': new_version, >+ 'op_sys': origbug.op_sys, >+ 'platform': origbug.platform, >+ 'summary': origbug.summary, >+ 'description': clone_message, >+ 'comment_is_private': isprivate, >+ 'priority': origbug.priority, >+ 'bug_severity': origbug.bug_severity, >+ 'depends_on': depends_on, >+ 'blocked': origbug.blocked, >+ 'whiteboard': origbug.whiteboard, >+ 'keywords': origbug.keywords, >+ 'cc': cc, >+ 'estimated_time': origbug.estimated_time, >+ 'remaining_time': origbug.remaining_time, >+ 'deadline': origbug.deadline, >+ 'url': origbug.bug_file_loc, >+ 'target_release': new_target_release, >+ 'cf_qa_whiteboard': origbug.qa_whiteboard, >+ 'cf_clone_of': str(origbug.id), >+ 'cf_cust_facing': origbug.cf_cust_facing, >+ 'cf_devel_whiteboard': origbug.devel_whiteboard, >+ 'cf_internal_whiteboard': origbug.internal_whiteboard, >+ 'cf_build_id': origbug.cf_build_id, >+ 'cf_partner': origbug.cf_partner, >+ 'cf_verified': ['Any'], >+ 'cf_environment': origbug.cf_environment, >+ 'groups': origbug.groups >+ } >+ for key in kwargs.keys(): >+ if kwargs[key] is None: >+ del kwargs[key] >+ newbug = self.createbug(**kwargs) >+ # external tracker references >+ extbugs = [] >+ for eb in origbug.external_bugs: >+ neb = {} >+ neb['ext_bz_bug_id'] = eb['ext_bz_bug_id'] >+ neb['ext_type_id'] = eb['type']['id'] >+ extbugs.append(neb) >+ self._proxy.ExternalBugs.add_external_bug({ >+ 'bug_ids': [newbug.id], >+ 'external_bugs': extbugs}) >+ return newbug >+ > > ######################################## > # Methods for working with attachments #
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 909480
: 827050