Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: closed Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution: fixed | Keywords: qct ---+--- Comment (by rjollos): Replying to [comment:5 matevzb]: If I understand correctly, QCT should default to the product in the current scope, but still allow selection of other products. And when invoked in the global scope, it should default to the default_product. This behavior is being implemented in #304. Specifically, after this ticket was finished, when at global scope the //Product// select defaulted to the first entry in the list. It should default to `[ticket] default_product`, or the first entry in the list if `[ticket] default_product` does not exist or is not defined. In this ticket I was using `[multiproduct] default_product_prefix` in many places where I should have said `[ticket] default_product`, and comment:11 was incorrect about `[ticket] default_product` not being a valid option. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:17 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: closed Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution: fixed | Keywords: qct ---+--- Comment (by olemis): Replying to [comment:13 rjollos]: The `base_url` is obtained from the `data-target` attribute of the `#qct-create` button. It appears to me that `data-target` will always contain the `base_url` for the product in the current scope. Yes , and that's the way it should always be . [...] The solution I've implemented is to parse the global `base_url` from `data-target` and also pass the `product` to the //ticket create// callback. I'd not recommend to do so because that will not work for custom URL deployments e.g. sub-domains. There's no need to use target product prefix to generate any URL. With that information, the proper `href` for the newly created ticket can be constructed. Under certain circumstances ... I'm not sure this will be accurate enough. Let me know if you see any issues with how I've implemented, or possibilities for simplifying it through refactoring. I'll take a look tomorrow. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:16 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: new Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution:| Keywords: qct ---+--- Comment (by rjollos): The `base_url` is obtained from the `data-target` attribute of the `#qct- create` button. It appears to me that `data-target` will always contain the `base_url` for the product in the current scope. In the dev environment setup the value will typically be `/sqlite`, `/sqlite/products/@` or `/sqlite/products/product`. The solution I've implemented is to parse the global `base_url` from `data-target` and also pass the `product` to the //ticket create// callback. With that information, the proper `href` for the newly created ticket can be constructed. Let me know if you see any issues with how I've implemented, or possibilities for simplifying it through refactoring. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:13 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: new Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution:| Keywords: qct ---+--- Comment (by rjollos): (In [1500163]) Make the ''!View/Edit'' link in the QCT dialog point to proper product scope (Refs #569). When creating a ticket through the QCT dialog for a product when in the scope of another product, the //View/Edit// link would not be properly product-scoped. For example, when creating a ticket associated with product B when in the scope of product A, the `href` for the //View/Edit// link would be `/products/productA/ticket/id`, but should be `/products/productB/ticket/id`. Changes have been tested on the desktop and mobile browsers. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:14 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: closed Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution: fixed | Keywords: qct ---+--- Changes (by rjollos): * status: new = closed * resolution: = fixed Comment: Closing now, but I'd be interested to get feedback and any refactoring suggestions. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:15 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: new Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution:| Keywords: qct ---+--- Changes (by rjollos): * status: closed = new * resolution: fixed = Comment: The //View/Edit// link in the balloon is not always redirecting to the correct product. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:12 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution:| Keywords: qct ---+--- Comment (by rjollos): Replying to [comment:5 matevzb]: If I understand correctly, QCT should default to the product in the current scope, but still allow selection of other products. And when invoked in the global scope, it should default to the default_product. After investigating further, I've found that the behavior is as you describe, and the problem is what you've suggested - it just doesn't behave correctly when `[multiproduct] default_ticket_prefix` is set to a prefix that doesn't exist. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:9 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution:| Keywords: qct ---+--- Description changed by rjollos: Old description: To reproduce: 1. Create two products, `prod1` and `prod2`. 1. Set `[ticket] default_product = prod1`. 1. Navigate to `/products/prod2` 1. Create a ticket via //Quick Create Ticket//. 1. Follow the `View / Edit` link in the balloon that appears after creating the ticket. You will land on an error page with: **Error: Invalid ticket number** Ticket 1 does not exist. The URL will be `/products/prod2/ticket/1`. Navigate to `/products/prod1/ticket/1` to find the ticket, replacing `1` with the number of the ticket that was created, if necessary. New description: To reproduce: 1. Create two products, `prod1` and `prod2`. 1. Set `[multiproduct] default_product_prefix = prod1`. 1. Navigate to `/products/prod2` 1. Create a ticket via //Quick Create Ticket//. 1. Follow the `View / Edit` link in the balloon that appears after creating the ticket. You will land on an error page with: **Error: Invalid ticket number** Ticket 1 does not exist. The URL will be `/products/prod2/ticket/1`. Navigate to `/products/prod1/ticket/1` to find the ticket, replacing `1` with the number of the ticket that was created, if necessary. -- -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:10 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: closed Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution: fixed | Keywords: qct ---+--- Changes (by rjollos): * status: accepted = closed * resolution: = fixed Old description: To reproduce: 1. Create two products, `prod1` and `prod2`. 1. Set `[multiproduct] default_product_prefix = prod1`. 1. Navigate to `/products/prod2` 1. Create a ticket via //Quick Create Ticket//. 1. Follow the `View / Edit` link in the balloon that appears after creating the ticket. You will land on an error page with: **Error: Invalid ticket number** Ticket 1 does not exist. The URL will be `/products/prod2/ticket/1`. Navigate to `/products/prod1/ticket/1` to find the ticket, replacing `1` with the number of the ticket that was created, if necessary. New description: To reproduce: 1. Create two products, `prod1` and `prod2`. 1. Set `[ticket] default_product = prod1`. 1. Navigate to `/products/prod2` 1. Create a ticket via //Quick Create Ticket//. 1. Follow the `View / Edit` link in the balloon that appears after creating the ticket. You will land on an error page with: **Error: Invalid ticket number** Ticket 1 does not exist. The URL will be `/products/prod2/ticket/1`. Navigate to `/products/prod1/ticket/1` to find the ticket, replacing `1` with the number of the ticket that was created, if necessary. -- Comment: I think that part of this report is invalid since `[ticket] default_product` isn't an option that should be specified. The changes in [1496179] and [1496220] should prevent the possibility of this configuration error though. (In [1496179]) Refs #569: * If `[multiproduct] default_product_prefix` is invalid (set to a non- existing prefix), tickets created at global scope will use the first product in the sorted list. * The fields of tickets created through the QCT dialog now default to the values specified in the `[ticket]` section of trac.ini. For fields displayed in the dialog (i.e. those specified in `[ticket] quick_create_fields`, the select now defaults to the proper value. Fields not displayed in the dialog are passed as hidden form fields. (In [1496220]) Refs #569: * Added `product` to default `quick_create_fields`. * Ensure that the `product` select is properly populated, even when `[multiproduct] default_product_prefix` is invalid. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:11 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+ Reporter: rjollos | Owner: nobody Type: defect| Status: new Priority: major | Milestone: Component: multiproduct |Version: Resolution:| Keywords: ---+ Comment (by matevzb): Replying to [comment:1 rjollos]: When in the scope of a product, I think that tickets should be created for that product. I know this was discussed on the mailing list. Am I remember correctly the intended behavior? That was the intended behaviour, and it seems to work this way unless default_product is set in the configuration. What Joe recommends also makes sense, so that one can quick-create a ticket for other products even when not in that scope. If I understand correctly, QCT should default to the product in the current scope, but still allow selection of other products. And when invoked in the global scope, it should default to the default_product. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:5 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+ Reporter: rjollos | Owner: nobody Type: defect| Status: new Priority: major | Milestone: Component: multiproduct |Version: Resolution:| Keywords: ---+ Comment (by rjollos): Replying to [comment:5 matevzb]: If I understand correctly, QCT should default to the product in the current scope, but still allow selection of other products. And when invoked in the global scope, it should default to the default_product. I feel that what you suggest is the best solution. Therefore, I propose to: 1. Add a **Product** `select` to the QCT. 1. Default the `select` to the product in current scope. 1. At global scope, default the product `select` to `[ticket] default_product`. 1. If `[ticket] default_product` is not set to a valid product, default the product select to the first `option` in the `select` with the products having been ordered sorted. Whereas (4) should protect against the issue in #568, some additional protection may be added in that ticket. I'll wait for feedback today before making these changes. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:6 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+--- Reporter: rjollos | Owner: rjollos Type: defect| Status: accepted Priority: blocker | Milestone: Release 6 Component: multiproduct |Version: Resolution:| Keywords: qct ---+--- Comment (by jdreimann): Replying to [comment:6 rjollos]: I'll wait for feedback today before making these changes. I agree with your suggestions (obviously) :-) -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:8 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
Re: [Apache Bloodhound] #569: QCT view/edit link can direct to Error: Invalid ticket number
#569: QCT view/edit link can direct to Error: Invalid ticket number ---+ Reporter: rjollos | Owner: nobody Type: defect| Status: new Priority: major | Milestone: Component: multiproduct |Version: Resolution:| Keywords: ---+ Comment (by olemis): Replying to [comment:2 jdreimann]: Quick Ticket should never be scoped. I still firmly believe that scoping of any of the main-nav, search and qct elements provides a predictably confusing experience, not a predictably useful experience. I do not agree . Just consider a multi-domain deployment and scoping does make sense . We should simply default to the current product in the relevant drop down within the quick ticket dialogue. I do want quick ticket form to be scoped considering active product context, or at least default values set consistently. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/569#comment:4 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker