Closed Bug 672962 Opened 13 years ago Closed 13 years ago

Allow saving changes to existing demo details and/or tags after Dev Derby deadline

Categories

(developer.mozilla.org Graveyard :: Demo Studio / Dev Derby, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: retornam, Assigned: jbennett)

References

()

Details

(Whiteboard: u=contributor c=demos p=2 pa=3)

STR:
1) Visit https://developer-stage9.mozilla.org/en-US/demos/submit?tags=challenge%3A2011%3Ajuly and submit the demo under the July derby
2) Visit the admin interface find the demo you submitted and change its tag from
challenge:2011:july  to challenge:2011:june 

Expected Results
3)Visit https://developer-stage9.mozilla.org/en-US/demos/devderby/2011/june/ and scroll through for to find your demo


Actual Results
Demo is not added to the list of demos even after updating  your tag
Priority: -- → P1
This is a bug we've seen a few times from Dev Derby authors trying to update something in their demo details after the deadline.

It appears that their Dev Derby tag for that month is removed when they save their changes.

It will be nice to have some logic in place to allow for minor changes to demos after the deadline, and provide some feedback/alerts if they try to submit major changes (upload new .zip) after the deadline.

Ideally, a demo author should be able to update anything but the code for their demo after the submission deadline without having their entry (tag) removed from that month's Dev Derby.
Summary: Demo does not show up under June derby after updating tags to challenge:2011:june → Allow saving changes to existing demo details and/or tags after Dev Derby deadline
Target Milestone: --- → 1.3
Whiteboard: u=contributor c=demos p=
Make sure we show the derby checkbox on the edit demo page until the deadline.
Whiteboard: u=contributor c=demos p= → u=contributor c=demos p=2
Assignee: nobody → jbennett
Just now peeking at this bug. I think the problem here is this:

1) Challenge tags applied to the demo appear as checkboxes on the submit/edit form
2) The form saves the set of challenge tags based on the checkboxes
3) The checkbox for a Dev Derby goes away after the deadline

Thus, if the checkbox is missing, it can't appear in the form as checked. And so, the challenge tag for the past-deadline derby goes away when the form is saved.

As a quick fix, I'd suggest a hidden form field listing challenge tags for past-deadline derbies. That would help preserve the tags between saves, when the checkboxes go away.
(In reply to Jay Patel [:jay] from comment #1)

> Ideally, a demo author should be able to update anything but the code for
> their demo after the submission deadline without having their entry (tag)
> removed from that month's Dev Derby.

FWIW, restricting code uploads based on deadlines is a bit more complicated, and probably deserves a separate bug.

Need to work out a few things... like, aren't demos eligible to be entered into multiple derbies? And if so, restricting code upload would mean that an author can only update code up until the first derby's deadline - and after that, they're stuck with the same code for each subsequent derby.

The easier thing there would be to restrict demos to one derby. And then, for any demo submitted to a derby, freeze it entirely after the deadline and allow no more edits of any kind. Require the submission of new demo entries and uploads for additional derbies.
Per discussion in IRC: Ignore my last two comments. The better solution is to disallow entry into multiple derbies altogether. Switch from checkboxes to a select box and only allow one challenge tag.
Got a partially-working solution that tries to balance all the concerns above, but unfortunately it won't be a fully-working solution before code freeze (which I think has technically passed already), so bumping to 1.4.
Target Milestone: 1.3 → 1.4
Target Milestone: 1.4 → 1.5
I added a demo to "current" derby (september), changed the current derby to october, then tried to edit the demo and got this:

Traceback (most recent call last):

  File "/Users/lcrouch/code/kuma/vendor/src/django/django/core/servers/basehttp.py", line 280, in run
    self.result = application(self.environ, self.start_response)

  File "/Users/lcrouch/code/kuma/vendor/src/django/django/core/servers/basehttp.py", line 674, in __call__
    return self.application(environ, start_response)

  File "/Users/lcrouch/code/kuma/vendor/src/django/django/core/handlers/wsgi.py", line 248, in __call__
    response = self.get_response(request)

  File "/Users/lcrouch/code/kuma/vendor/src/django/django/core/handlers/base.py", line 141, in get_response
    return self.handle_uncaught_exception(request, resolver, sys.exc_info())

  File "/Users/lcrouch/code/kuma/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/Users/lcrouch/code/kuma/apps/demos/views.py", line 270, in edit
    sub = form.save()

  File "/Users/lcrouch/code/kuma/apps/demos/forms.py", line 182, in save
    if commit: save_m2m()

  File "/Users/lcrouch/code/kuma/apps/demos/forms.py", line 180, in save_m2m
    self.instance.taggit_tags.set_ns('challenge:', *[challenge_tags])

  File "/Users/lcrouch/code/kuma/vendor/lib/python/taggit/utils.py", line 125, in inner
    return func(self, *args, **kwargs)

  File "/Users/lcrouch/code/kuma/apps/taggit_extras/managers.py", line 111, in set_ns
    self.add_ns(namespace, *tags)

  File "/Users/lcrouch/code/kuma/vendor/lib/python/taggit/utils.py", line 125, in inner
    return func(self, *args, **kwargs)

  File "/Users/lcrouch/code/kuma/apps/taggit_extras/managers.py", line 91, in add_ns
    ns_tags = self._ensure_ns(namespace, tags)

  File "/Users/lcrouch/code/kuma/apps/taggit_extras/managers.py", line 128, in _ensure_ns
    if not t.startswith(namespace):

AttributeError: 'list' object has no attribute 'startswith'
Bumping to 1.6 since we didn't get this ironed out before 1.5 push. We might put it in 1.5.1 if we finish by then (Monday).
Target Milestone: 1.5 → 1.6
What's the status here? I've seen some more commits, so is this ready now?
Whiteboard: u=contributor c=demos p=2 → u=contributor c=demos p=2 pa=3
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
verified fixed https://developer.mozilla.org/en-US/demos/devderby/2011/september/ using the ClockTest Demo
Status: RESOLVED → VERIFIED
Version: MDN → unspecified
Component: Demos → Demo Studio / Dev Derby
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.