/srv/irclogs.ubuntu.com/2013/08/21/#launchpad-dev.txt

=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/hide-related-blueprints/+merge/18119805:21
wgrantStevenK: k05:23
StevenKwgrant: 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:40
wgrantStevenK: What will happen if the user can't write to either the last build PPA or the daily build PPA?05:44
StevenKwgrant: 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:46
wgrantStevenK: Right, which means you have the same problem.05:49
wgrantIt ends up selecting the first PPA in the list.05:49
StevenKIn the case of the daily build PPA or last build PPA being unappendable, I think that's okay05:50
wgrantI don't think so.05:50
wgrantIt's too easy an accident to make, and lots of people make it.05:50
wgrantI think it should default to the daily build archive or nothing.05:51
wgrantProbably.05:51
StevenKOnly probably?05:51
StevenKwgrant: Like http://pastebin.ubuntu.com/6009118/ , then?05:53
wgrantStevenK: 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:54
StevenKOh, so the default is empty string or something05:55
StevenK(With no daily build archive)05:55
StevenKwgrant: http://pastebin.ubuntu.com/6009155/06:12
wgrantStevenK: Does ensuring that the archive field is required not work?06:21
wgrantThe form infrastructure has some built-in functionality to add a "(no value)" option.06:21
wgrantOr some text like that.06:21
StevenKwgrant: The only thing I can see like that is missing_value for Field06:27
StevenKBut that doesn't add it to the vocab06:27
wgrantStevenK: It doesn't need to be in the vocab, just the form field.06:28
wgranteg. +copy-packages overrides it to say "The same series"06:28
StevenKwgrant: Which requires a new class that subs from LaunchpadDropDownWidget -- all the existing code has a Choice()06:30
wgrantStevenK: Have you looked at the internals to see how you can make the option appear?06:31
StevenKI've tried. zope.schema eats babies.06:32
StevenKwgrant: http://pastebin.ubuntu.com/6009237/06:47
wgrantStevenK: 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:50
StevenKwgrant: I could, if I could figure out how to do that06:58
wgrantStevenK: You can do it using a custom_widgets attribute on the form, I think.06:59
StevenKReally?07:00
StevenKI thought I would have reach into setUpWidgets and such07:00
wgrantYou might have to.07:02
wgrantcustom_widgets might just let you specify custom classes.07:02
wgrantNot sure.07:02
StevenKI think it's just custom classes, yeah.07:02
* wgrant mocks tests down from 3s to 0.008s.07:09
StevenKwgrant: I recall self.fields.omit() -- but it seems widgets don't work like that07:12
=== tasdomas_afk is now known as tasdomas
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
GuidoPallemansHi 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 basic13:29
=== 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
StevenKwgrant: 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 validate23:48

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!