| === Ursinha is now known as Ursinha-afk |
| === Ursinha-afk is now known as Ursinha |
| [05:21] <StevenK> wgrant: https://code.launchpad.net/~stevenk/launchpad/hide-related-blueprints/+merge/181198 |
| [05:23] <wgrant> StevenK: k |
| [05:40] <StevenK> wgrant: Re bug 1128655 ; http://pastebin.ubuntu.com/6009086/ |
| [05:40] <_mup_> Bug #1128655: Creating a recipe and then requesting a build has an incorrect PPA selected by default in the build request dialog <confusing-ui> <easy> <ppa> <recipe> <ui> <Launchpad itself:Triaged> <https://launchpad.net/bugs/1128655> |
| [05:44] <wgrant> StevenK: What will happen if the user can't write to either the last build PPA or the daily build PPA? |
| [05:46] <StevenK> wgrant: The list is populated with PPAs the user has upload permission for, so if the initial value is not in that list, I'd hope its ignored. |
| [05:49] <wgrant> StevenK: Right, which means you have the same problem. |
| [05:49] <wgrant> It ends up selecting the first PPA in the list. |
| [05:50] <StevenK> In the case of the daily build PPA or last build PPA being unappendable, I think that's okay |
| [05:50] <wgrant> I don't think so. |
| [05:50] <wgrant> It's too easy an accident to make, and lots of people make it. |
| [05:51] <wgrant> I think it should default to the daily build archive or nothing. |
| [05:51] <wgrant> Probably. |
| [05:51] <StevenK> Only probably? |
| [05:53] <StevenK> wgrant: Like http://pastebin.ubuntu.com/6009118/ , then? |
| [05:54] <wgrant> StevenK: Right, but you'll also need to change something so the <select> has an option for no value, and ensure that the form rejects that. |
| [05:55] <StevenK> Oh, so the default is empty string or something |
| [05:55] <StevenK> (With no daily build archive) |
| [06:12] <StevenK> wgrant: http://pastebin.ubuntu.com/6009155/ |
| [06:21] <wgrant> StevenK: Does ensuring that the archive field is required not work? |
| [06:21] <wgrant> The form infrastructure has some built-in functionality to add a "(no value)" option. |
| [06:21] <wgrant> Or some text like that. |
| [06:27] <StevenK> wgrant: The only thing I can see like that is missing_value for Field |
| [06:27] <StevenK> But that doesn't add it to the vocab |
| [06:28] <wgrant> StevenK: It doesn't need to be in the vocab, just the form field. |
| [06:28] <wgrant> eg. +copy-packages overrides it to say "The same series" |
| [06:30] <StevenK> wgrant: Which requires a new class that subs from LaunchpadDropDownWidget -- all the existing code has a Choice() |
| [06:31] <wgrant> StevenK: Have you looked at the internals to see how you can make the option appear? |
| [06:32] <StevenK> I've tried. zope.schema eats babies. |
| [06:47] <StevenK> wgrant: http://pastebin.ubuntu.com/6009237/ |
| [06:50] <wgrant> StevenK: Can you possibly just override the field used by the *widget* to have required=False, so the validation can see required=True as normal, obviating the need for the extra code in validate()? |
| [06:58] <StevenK> wgrant: I could, if I could figure out how to do that |
| [06:59] <wgrant> StevenK: You can do it using a custom_widgets attribute on the form, I think. |
| [07:00] <StevenK> Really? |
| [07:00] <StevenK> I thought I would have reach into setUpWidgets and such |
| [07:02] <wgrant> You might have to. |
| [07:02] <wgrant> custom_widgets might just let you specify custom classes. |
| [07:02] <wgrant> Not sure. |
| [07:02] <StevenK> I think it's just custom classes, yeah. |
| [07:09] * wgrant mocks tests down from 3s to 0.008s. |
| [07:12] <StevenK> wgrant: I recall self.fields.omit() -- but it seems widgets don't work like that |
| === tasdomas_afk is now known as tasdomas |
| === Ursinha is now known as Ursinha-afk |
| === Ursinha-afk is now known as Ursinha |
| [13:29] <GuidoPallemans> Hi everyone, I'm planning on building a launchpad app for the Ubuntu touch project, but I don't personally use launchpad actively. Can anybody help me what this app needs? it's going to be pretty basic |
| === tasdomas is now known as tasdomas_afk |
| === Ursinha is now known as Ursinha-afk |
| === Ursinha-afk is now known as Ursinha |
| === BradCrittenden is now known as bac |
| === BradCrittenden is now known as bac |
| [23:48] <StevenK> wgrant: So yes, I can add a widget with required=False, but TBH, it's easier to change the field in the schema and eat the check in validate |
|
|