I didn't notice that but you were right, the ticket was there.

Updating to the latest revision (1506046) + reapplying the patch fixes the
issue.


On 23 July 2013 15:43, Anze Staric <[email protected]> wrote:

> This is the error I encountered. If you check the global dashboard,
> you will see, that ticket 8 was created, but it is assigned to the
> product you marked as default in the admin. This has been fixed in
> r1506038, so updating your checked out version (and reapplying the
> patch) should solve the issue.
>
>
>
> On Tue, Jul 23, 2013 at 3:32 PM, Ruggero Marchei
> <[email protected]> wrote:
> > I found a problem but I'm not sure it is the same one you are referring
> to.
> >
> > I did the following steps:
> >
> > new bloodhound installation (last revision + your patch).
> > login
> > create a new ticket (ticket1) on the default Product using the quick
> ticket
> > [OK]
> > create a new ticket (ticket2) on the default Product using the /newticket
> > [OK]
> > create a new product (@newProduct with description "this is a new
> product"
> > and assigned to admin) [OK]
> > create a new ticket (ticket3) on the default Product using the quick
> ticket
> > [OK]
> > create a new ticket (ticket4) on the default Product using the /newticket
> > [OK]
> > create a new ticket (ticket5) on @newProduct using the quick ticket [OK]
> > create a new ticket (ticket6) on @newProduct using the /newticket [OK]
> > change @newProduct as default product (from the web console)
> > create a new ticket (ticket7) on the default Product using the quick
> ticket
> > [OK]
> > create a new ticket (ticket8) on the default Product using the /newticket
> > [FAIL]
> >
> >
> > The error on the Dashboard is:
> >
> > Error: Invalid ticket number
> >
> > Ticket 8 does not exist.
> >
> > TracGuide — The Trac User and Administration Guide
> >
> >
> > On the log file:
> >
> > 2013-07-23 15:13:45,031 Trac[main] DEBUG: Dispatching
> > <ProductRequestWithSession "POST '/newticket'">
> >
> > 2013-07-23 15:13:45,043 Trac[session] DEBUG: Retrieving session for ID
> > u'admin'
> >
> > 2013-07-23 15:13:45,046 Trac[main] DEBUG: Negotiated locale: None ->
> en_US
> >
> > 2013-07-23 15:13:45,067 Trac[api] WARNING: Unable to find repository
> > '(default)' for synchronization
> >
> > 2013-07-23 15:13:45,260 Trac[main] DEBUG: Dispatching
> > <ProductRequestWithSession "GET '/ticket/8'">
> >
> > 2013-07-23 15:13:45,262 Trac[session] DEBUG: Retrieving session for ID
> > u'admin'
> >
> > 2013-07-23 15:13:45,263 Trac[main] DEBUG: Negotiated locale: None ->
> en_US
> >
> > 2013-07-23 15:13:45,278 Trac[api] WARNING: Unable to find repository
> > '(default)' for synchronization
> >
> > 2013-07-23 15:13:45,289 Trac[chrome] DEBUG: Prepare chrome data for
> request
> >
> > 2013-07-23 15:13:45,431 Trac[web_ui] DEBUG: {'active': False, 'name':
> > 'wiki', 'label': <Element "a">}
> >
> > 2013-07-23 15:13:45,431 Trac[web_ui] DEBUG: {'active': False, 'name':
> > 'browser', 'label': <Element "a">}
> >
> > 2013-07-23 15:13:45,432 Trac[web_ui] DEBUG: {'active': True, 'name':
> > 'tickets', 'label': <Element "a">}
> >
> > 2013-07-23 15:13:45,432 Trac[main] WARNING: [192.168.113.1] HTTPNotFound:
> > 404 Invalid ticket number (Ticket 8 does not exist.)
> >
> >
> > Creating ticket8 from the quick ticket works as expected.
> >
> > I also noticed that if I open a ticket from the quick ticket the Owner in
> > the Dashboard is null, if I open it form /newticket the owner is somebody
> > (literally), as shown in the attached screenshot. Is that normal?
> >
> >
> >
> >
> >
> > On 23 July 2013 14:43, Anze Staric <[email protected]> wrote:
> >>
> >> Creating tickets using quick ticket should work as expected, but that
> >> is still at least one problem that needs to be fixed. If you have a
> >> default_product set in config and create tickets in non-default
> >> products using /newticket, they will be created in default product
> >> instead.
> >>
> >> This can be solved by implementing #602.
> >>
> >> https://issues.apache.org/bloodhound/ticket/602
> >>
> >> On Tue, Jul 23, 2013 at 2:18 PM, Ruggero Marchei
> >> <[email protected]> wrote:
> >> > I did a new installation using the latest trunk version plus your
> patch
> >> > and
> >> > now everything seems to work fine.
> >> >
> >> > Thank you Anze!
> >> >
> >> >
> >> > On 23 July 2013 14:08, Anze Staric <[email protected]> wrote:
> >> >
> >> >> Never mind, I figured that products admin saved the wrong value to
> the
> >> >> config (product.name instead of product.prefix). That has been fixed
> >> >> in r1505980.
> >> >>
> >> >> For your current setup, after updating to the latest version of trunk
> >> >> and applying the patch, you should go the the products admin again
> and
> >> >> save it (so it will put the right value in the config). Tickets will
> >> >> need to be fixed manually using sql. Something along the lines of
> >> >> UPDATE ticket set product='<your product prefix>' WHERE product='this
> >> >> is a new product'; should work.
> >> >>
> >> >> On Tue, Jul 23, 2013 at 1:30 PM, Anze Staric <[email protected]>
> >> >> wrote:
> >> >> > One of the tickets probably contains "this is a new product" in a
> >> >> > product field. I guess this is the name of your newly created
> >> >> > product.
> >> >> > How it got there in the first place, I am still not sure.
> >> >> >
> >> >> > Can you please look at your trac.ini and post the value of
> >> >> > default_product option in section [ticket]? I am still trying to
> >> >> > reproduce you error, but so far, it was only possible by inserting
> a
> >> >> > value with a an invalid product directly into the database.
> >> >> >
> >> >> > On Tue, Jul 23, 2013 at 11:25 AM, Ruggero Marchei
> >> >> > <[email protected]> wrote:
> >> >> >> I applied the patch and with that I was able to create a new
> ticket
> >> >> >> even
> >> >> >> after adding a new product and select it as a default.
> >> >> >>
> >> >> >> Anyway, after creating the new ticket, if I click on "tickets" on
> >> >> >> the
> >> >> web
> >> >> >> interface I have this error:
> >> >> >>
> >> >> >> Widget error
> >> >> >>
> >> >> >> Error × Exception raised while rendering widget. Contact your
> >> >> administrator
> >> >> >> for further details.
> >> >> >> Widget name TicketQueryException typeLookupError Log entry ID
> >> >> >> 9ecf1f56-b691-4fb1-b9f6-65590bc2df9b
> >> >> >>
> >> >> >> From the logs I get:
> >> >> >>
> >> >> >> 2013-07-23 11:21:52,745 Trac[web_ui] ERROR: -
> >> >> >> 9ecf1f56-b691-4fb1-b9f6-65590bc2df9b - Error rendering widget
> >> >> TicketQuery
> >> >> >> with options {'args': {'max': 10, 'query':
> >> >> >>
> >> >>
> >> >>
> 'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone',
> >> >> >> 'title': 'Active Tickets'}}
> >> >> >> Traceback (most recent call last):
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhdashboard/web_ui.py",
> >> >> >> line 269, in _render_widget
> >> >> >>     return wp.render_widget(name, ctx, options)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhdashboard/util.py",
> >> >> >> line 132, in widget_name_checker
> >> >> >>     return f(self, name, *args, **kwargs)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhdashboard/widgets/query.py",
> >> >> >> line 102, in render_widget
> >> >> >>     data = qrymdl.process_request(fakereq)[1]
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py",
> >> >> >> line 230, in process_request
> >> >> >>     return self.display_html(req, query)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py",
> >> >> >> line 242, in display_html
> >> >> >>     tickets = query.execute(req)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py",
> >> >> >> line 128, in execute
> >> >> >>     row[product_idx], val)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py",
> >> >> >> line 71, in _get_ticket_href
> >> >> >>     env = lookup_product_env(self.env, prefix)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/env.py",
> >> >> >> line 911, in lookup_env
> >> >> >>     return ProductEnvironment(global_env, prefix)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/cache.py",
> >> >> >> line 67, in wrapper
> >> >> >>     result = user_function(*args, **kwds)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/env.py",
> >> >> >> line 379, in __call__
> >> >> >>     return ComponentMeta.__call__(self, *args, **kwargs)
> >> >> >>   File
> >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/core.py",
> >> >> >> line 140, in __call__
> >> >> >>     self.__init__(*args, **kwargs)
> >> >> >>   File
> >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/core.py",
> >> >> >> line 107, in new_init
> >> >> >>     original_init(self, *args, **kwargs)
> >> >> >>   File
> >> >> >>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/env.py",
> >> >> >> line 534, in __init__
> >> >> >>     raise LookupError("Missing product %s" % (product,))
> >> >> >> LookupError: Missing product this is a new product
> >> >> >>
> >> >> >>
> >> >> >> On 23 July 2013 10:45, Anze Staric <[email protected]> wrote:
> >> >> >>
> >> >> >>> I have attached a patch to the issue #601, that should fix the
> >> >> >>> issue.
> >> >> >>> Can you give it a try?
> >> >> >>>
> >> >> >>>
> >> >> >>>
> >> >>
> >> >>
> https://issues.apache.org/bloodhound/attachment/ticket/601/t601_r1505871_do_not_add_product_column_if_already_exists_in_insert.diff
> >> >> >>>
> >> >> >>> On Tue, Jul 23, 2013 at 9:52 AM, Ruggero Marchei
> >> >> >>> <[email protected]> wrote:
> >> >> >>> > It happens on both but I noticed it happens only when I select
> >> >> >>> > the
> >> >> new
> >> >> >>> > product as "default".
> >> >> >>> >
> >> >> >>> > To reproduce the problem: create a new product, select it as
> >> >> >>> > default
> >> >> and
> >> >> >>> > then apply changes.
> >> >> >>> > New ticket creation then fails with the error mentioned before.
> >> >> >>> >
> >> >> >>> >
> >> >> >>> > On 23 July 2013 08:30, Anze Staric <[email protected]>
> wrote:
> >> >> >>> >
> >> >> >>> >> After adding a new product, did you try to add a ticket using
> a
> >> >> quick
> >> >> >>> >> ticket dialog or /newticket page?
> >> >> >>> >>
> >> >> >>> >> On Tue, Jul 23, 2013 at 12:55 AM, Ruggero Marchei
> >> >> >>> >> <[email protected]> wrote:
> >> >> >>> >> > After some tests I noticed that if I add a new product and
> >> >> >>> >> > then
> >> >> try to
> >> >> >>> >> > create a new ticket it fails with the error I was getting
> >> >> >>> >> > before,
> >> >> so
> >> >> >>> that
> >> >> >>> >> > patch resolves the issue only partially.
> >> >> >>> >> >
> >> >> >>> >> > Ruggero
> >> >> >>> >> >
> >> >> >>> >> >
> >> >> >>> >> > On 22 July 2013 22:43, Ruggero Marchei
> >> >> >>> >> > <[email protected]
> >> >> >
> >> >> >>> >> wrote:
> >> >> >>> >> >
> >> >> >>> >> >> Thanks for the suggestion Matevz,
> >> >> >>> >> >>
> >> >> >>> >> >> I tried version 0.7.0dev-r1505666 (svn revision 1505794)
> and
> >> >> >>> >> >> it
> >> >> fixed
> >> >> >>> >> the
> >> >> >>> >> >> issue!
> >> >> >>> >> >>
> >> >> >>> >> >> Ruggero
> >> >> >>> >> >>
> >> >> >>> >> >>
> >> >> >>> >> >> On 22 July 2013 21:35, Matevž Bradač <[email protected]>
> >> >> wrote:
> >> >> >>> >> >>
> >> >> >>> >> >>>
> >> >> >>> >> >>> On 22. Jul, 2013, at 21:22, Ruggero Marchei wrote:
> >> >> >>> >> >>>
> >> >> >>> >> >>> > Hi all,
> >> >> >>> >> >>> >
> >> >> >>> >> >>> > I'm trying Bloodhound 0.6.0 on a CentOS 6.4 x86_64
> (python
> >> >> 2.6.6)
> >> >> >>> >> using
> >> >> >>> >> >>> > Mysql as a backend database. I followed the detailed
> >> >> installation
> >> >> >>> >> guide
> >> >> >>> >> >>> and
> >> >> >>> >> >>> > the installation completes without any error but is
> >> >> impossible to
> >> >> >>> >> >>> create a
> >> >> >>> >> >>> > new ticket. I can change preferences or create a new
> >> >> >>> >> >>> > "product"
> >> >> >>> >> without
> >> >> >>> >> >>> any
> >> >> >>> >> >>> > problem. The error found in the log file is:
> >> >> >>> >> >>> >
> >> >> >>> >> >>> > 2013-07-22 21:00:04,633 Trac[env] WARNING:
> >> >> >>> >> >>> > product_base_url
> >> >> option
> >> >> >>> >> not
> >> >> >>> >> >>> set
> >> >> >>> >> >>> > in configuration, generated links may be incorrect
> >> >> >>> >> >>> > 2013-07-22 21:00:04,634 Trac[main] DEBUG: Dispatching
> >> >> >>> >> >>> > <ProductRequestWithSession "POST '/qct'">
> >> >> >>> >> >>> > 2013-07-22 21:00:04,653 Trac[session] DEBUG: Retrieving
> >> >> session
> >> >> >>> for
> >> >> >>> >> ID
> >> >> >>> >> >>> > u'admin'
> >> >> >>> >> >>> > 2013-07-22 21:00:04,661 Trac[main] DEBUG: Negotiated
> >> >> >>> >> >>> > locale:
> >> >> None
> >> >> >>> ->
> >> >> >>> >> >>> en_US
> >> >> >>> >> >>> > 2013-07-22 21:00:04,683 Trac[api] WARNING: Unable to
> find
> >> >> >>> repository
> >> >> >>> >> >>> > '(default)' for synchronization
> >> >> >>> >> >>> > 2013-07-22 21:00:04,743 Trac[theme] ERROR: BH: Quick
> >> >> >>> >> >>> > create
> >> >> ticket
> >> >> >>> >> >>> failed
> >> >> >>> >> >>> > (1110, "Column 'product' specified twice")
> >> >> >>> >> >>> > Traceback (most recent call last):
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> >
> >> >> >>> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhtheme/theme.py",
> >> >> >>> >> >>> > line 519, in process_request
> >> >> >>> >> >>> >    product, tid = self.create(req, summary, desc, attrs,
> >> >> >>> >> >>> > True)
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> >
> >> >> >>> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhtheme/theme.py",
> >> >> >>> >> >>> > line 552, in create
> >> >> >>> >> >>> >    t.insert()
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> >
> >> >> >>> >> >>>
> >> >> >>> >>
> >> >> >>>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/ticket/model.py",
> >> >> >>> >> >>> > line 241, in insert
> >> >> >>> >> >>> >    [values[name] for name in std_fields])
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> >
> >> >> >>> >> >>>
> >> >> >>> >>
> >> >> >>>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/dbcursor.py",
> >> >> >>> >> >>> > line 143, in execute
> >> >> >>> >> >>> >    return self.cursor.execute(sql, args=args)
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> >
> >> >> >>> >> >>>
> >> >> >>> >>
> >> >> >>>
> >> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/dbcursor.py",
> >> >> >>> >> >>> > line 83, in execute
> >> >> >>> >> >>> >    return super(BloodhoundIterableCursor,
> >> >> >>> >> >>> > self).execute(translate_sql(self.env, sql), args=args)
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> >
> >> >> >>> >>
> >> >>
> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/db/util.py",
> >> >> >>> >> >>> line
> >> >> >>> >> >>> > 65, in execute
> >> >> >>> >> >>> >    return self.cursor.execute(sql_escape_percent(sql),
> >> >> >>> >> >>> > args)
> >> >> >>> >> >>> >  File
> >> >> >>> >> >>> > "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py",
> >> >> >>> line
> >> >> >>> >> 173,
> >> >> >>> >> >>> > in execute
> >> >> >>> >> >>> >    self.errorhandler(self, exc, value)
> >> >> >>> >> >>> >  File
> >> >> "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py",
> >> >> >>> >> line
> >> >> >>> >> >>> > 36, in defaulterrorhandler
> >> >> >>> >> >>> >    raise errorclass, errorvalue
> >> >> >>> >> >>> > ProgrammingError: (1110, "Column 'product' specified
> >> >> >>> >> >>> > twice")
> >> >> >>> >> >>> >
> >> >> >>> >> >>> >
> >> >> >>> >> >>> > It is possible to reproduce the issue installing a
> CentOS
> >> >> >>> >> >>> > 6.4
> >> >> >>> minimal
> >> >> >>> >> >>> then
> >> >> >>> >> >>> > running the commands listed here:
> >> >> >>> http://fpaste.org/27062/52016013/
> >> >> >>> >> >>> > Then login as admin/password and try to create a new
> >> >> >>> >> >>> > ticket.
> >> >> The
> >> >> >>> GUI
> >> >> >>> >> >>> raises
> >> >> >>> >> >>> > the error "Could not create ticket . Error : Internal
> >> >> >>> >> >>> > Server
> >> >> >>> Error"
> >> >> >>> >> >>> >
> >> >> >>> >> >>> > Is there something wrong with my setup? Could it be a
> bug?
> >> >> >>> >> >>> >
> >> >> >>> >> >>> > Thanks in advance,
> >> >> >>> >> >>> > Ruggero
> >> >> >>> >> >>>
> >> >> >>> >> >>> Hi Ruggero,
> >> >> >>> >> >>>
> >> >> >>> >> >>> This seems to be related to the issue reported for
> >> >> >>> >> >>> Postgres[1].
> >> >> >>> >> >>> Could you please try installing Bloodhound from the
> >> >> >>> >> >>> subversion
> >> >> >>> >> repository
> >> >> >>> >> >>> (trunk), Anze implemented a fix in r1505666 which may
> help.
> >> >> >>> >> >>>
> >> >> >>> >> >>> [1] - https://issues.apache.org/bloodhound/ticket/601
> >> >> >>> >> >>>
> >> >> >>> >> >>> --
> >> >> >>> >> >>> matevz
> >> >> >>> >> >>>
> >> >> >>> >> >>>
> >> >> >>> >> >>
> >> >> >>> >>
> >> >> >>>
> >> >>
> >
> >
>

Reply via email to