Bug 909480 - Automatically create "cloned" bugs in "Layered Product Common for RHEL 6"
Summary: Automatically create "cloned" bugs in "Layered Product Common for RHEL 6"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bugzilla
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-08 21:34 UTC by Debi Rieden
Modified: 2016-04-27 02:13 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-15 05:03:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
proposed patch (4.48 KB, patch)
2013-11-21 08:49 UTC, Martin Cermak
no flags Details | Diff

Description Debi Rieden 2013-02-08 21:34:46 UTC
I have a need, not sure if it is possible.  If you can do this, it would really cut down on mistakes and eliminate bugs not being created for issues found.

Question: 

We are starting up the Layered Product Common project and have a specific need for cloning bugs.

Question:
Is there a way to automatically create a bug (clone) based on an existing bug?
The cloning would be done without human intervention.

For example:
- A bug is filed for a product, say OpenStack [1].
- The component to be fixed lives in the LayeredProductCommon 
  (but you don't need to know this), 
- so a bug is cloned to track the fix in the LPC [2] "Red Hat Layered Product Common for RHEL 6".

Right now we are manually cloning the OpenStack bug to the "Layered Product Common for RHEL 6".
Is there a way to have this cloned automatically?

What we would need is the following (this is one example, there are other components and eventually many more products and components):
1. When a bug is filed for OpenStack, for component "python-greenlet"
2. Create a clone of this bug in "Layered Product Common for RHEL 6", 
   - same component "python-greenlet".
   - "Layered Product" list would have "OpenStack" selected

Longterm, I would provide the list of products and components. When a bug is filed for the product and component, it is automatically cloned.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=901584
[2] https://bugzilla.redhat.com/show_bug.cgi?id=902308

Please let me know if this is possible and what I need to do.

Comment 1 Simon Green 2013-04-15 05:03:17 UTC
(In reply to comment #0)
> I have a need, not sure if it is possible.  If you can do this, it would
> really cut down on mistakes and eliminate bugs not being created for issues
> found.
> 
> Question:
> Is there a way to automatically create a bug (clone) based on an existing
> bug?
> The cloning would be done without human intervention.
> 
> Please let me know if this is possible and what I need to do.

This is not possible in Red Hat Bugzilla. It would be my recommendation that you create a script that gets newly created bugs, and 'clones' them[1]. Both of these things can be done via RPC calls to Red Hat Bugzilla.

  -- simon

[1] By 'clone', I mean create a new bug.

Comment 2 Martin Cermak 2013-11-15 07:54:23 UTC
I recently attempted to put the bug cloning functionality into bugzilla or at least into python-bugzilla package:

https://bugzilla.redhat.com/show_bug.cgi?id=923436
https://bugzilla.mozilla.org/show_bug.cgi?id=860623

I have a patch in hand for this.

Comment 3 Simon Green 2013-11-15 11:03:31 UTC
Upstream don't want it, and I don't want it in our Bugzilla for the same reason. I'm reassigning this bug to python-bugzilla. Feel free to attach the patch to this bug, as see if they will pick it up.

Comment 4 Cole Robinson 2013-11-16 20:55:28 UTC
I'm not really interested in maintaining this in python-bugzilla either, since it sounds like a maintenance nightmare since clone behavior may change across bugzilla versions. I'd recommend just publishing a 'clone' script built around python-bugzilla and point interested users at that.

Comment 5 Martin Cermak 2013-11-18 11:29:20 UTC
This way the maintenance nightmare moves from {python-,}bugzilla to user scripts. But that it life ;-) Understood. Thanks.

Comment 6 Martin Cermak 2013-11-21 08:49:23 UTC
Created attachment 827050 [details]
proposed patch

Since I was privately asked for the patch, I'm attaching it here. 

On 19 March, 2013 the patch was rebased against upstream source
(git clone git://git.fedorahosted.org/git/python-bugzilla.git)
and internal tests 'python setup.py test' and 'python setup.py pylint'
didn't regress.


Note You need to log in before you can comment on or make changes to this bug.