Closed Bug 686776 Opened 13 years ago Closed 13 years ago

Target Milestone for Mozilla Reps (Swag component)

Categories

(bugzilla.mozilla.org :: Administration, task)

Production
x86_64
Linux
task
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: pierros, Assigned: dkl)

Details

Attachments

(1 file, 2 obsolete files)

Hello,

We would like to have editable target milestone for bugs in Swag Request Component (Mozilla Reps product).

Editable with date picker would be absolutely fantastic and helpful.
Is that possible?

Thanks!
sorry, but the target milestone field in bugzilla is a list of fixed values, and it isn't possible to change this to a date picker.

what is the exact problem that you're trying to address?
for each swag request there is a deadline shipping date.

we need to be able to short and easily identify those requests (bugs) based on that.

Any ideas?

Whiteboard is already taken by detailed status.
I don't see a big reason we can't create a due date custom field. It could be useful universally as well. One downside is that the timetracking fields already have a 'deadline' date picker field but the timetracking fields are not available to everyone and could cause issue if we opened it up. So in the short term, I think adding a new custom field will be ok for now.

dkl
Assignee: nobody → dkl
Status: NEW → ASSIGNED
Ok nice!

so, we will have the custom field with date picker, right?

can we push it asap?

Thanks!
(In reply to Pierros Papadeas from comment #4)
> so, we will have the custom field with date picker, right?

yes

> can we push it asap?

as this change will require code changes, you're realistically looking at mid/late next week before you'll see this on production.
Thanks! Waiting for this! :)
Just to clarify while I am working on this. You want the current "Ship Before" field in the MozReps Swag entry form to use this new field to store the value instead of being placed as text in the comment, right? If so, I will also remove the part of the comment showing the due date as it will be up in the normal bug fields.

dkl
Patch adding support for displaying new due date custom field for Mozilla Reps product only. Also update the remo-swag bug entry template to use the new field instead of the old ship date value going to the bugs description. 

One thing to note, we talked last week about fixing the calendar field to not place an empty time 0:00 when displaying the due date in show_bug.cgi. I think leaving as is for now is relatively harmless because:

1. The way it was originally implemented the field was meant to be both a date and date/time field.
2. Entering just a date works fine but when show_bug.cgi is redisplaying it, it is showing what the database is giving back which is YYYY-MM-DD 00:00:00. FILTER time is truncating the seconds. 
3. Manually entering a time in the field and then changing the date with the date picker, doesn't affect the time portion, only the date part so no harm there.
4. And then when the check_datetime_field validator is ran in Object.pm, the two values 'YYYY-MM-DD 00:00' and 'YYYY-MM-DD' are treated as equal since both sides are converted to UNIX time using the str2time function. So no problems should arise there.

Mainly it is just cosmetic for the most part.

dkl
Attachment #561004 - Flags: review?(glob)
Actually it would be OK to leave it as a text in the comment too (because it will be consistent with data extraction if we are going to do that)

Thanks!
Comment on attachment 561004 [details] [diff] [review]
Patch to add due date field for Mozilla Reps (v1)

Review of attachment 561004 [details] [diff] [review]:
-----------------------------------------------------------------

the due_date field isn't being populated on the bug.

i get a 404 for skins/custom/calendar.css when viewing the form.reps.swag form.  this doesn't appear to be a new error but should still be fixed since we're touching the calendar stuff.

::: extensions/REMO/template/en/default/bug/create/comment-remo-swag.txt.tmpl
@@ -39,5 @@
>  
>  Shipping details:
> -
> -Ship swag before: [% cgi.param('shipdate') %]
> -

as per pierros's comment, please leave the due date on the form.  make sure the only the date is outputted, not date and time.
Attachment #561004 - Flags: review?(glob) → review-
Thanks. Populating the Due Date field is working for me. I created a new field like so:

Name: cf_due_date
Description: Due Date
Type: Date/Time
Enter Bug: Yes

I created the Mozilla Reps product and mozilla-reps group on my test instance. When I commit I see the value in both the Due Date field and the initial comment.

I removed the css file causing the error as it was no longer needed and we just use the standard stylesheet.

I am not convinced that I need to do a removal of the time value from the cf_due_date field as most people will just use the date selector on the swag form. And for those who want to enter it manually, I created an example placeholder showing just a date. We can add the replace in the js before submit if it becomes an issue later.

dkl
Attachment #561004 - Attachment is obsolete: true
Attachment #561383 - Flags: review?(glob)
(In reply to David Lawrence [:dkl] from comment #11)
> Thanks. Populating the Due Date field is working for me. I created a new
> field like so:

my cf is configured the same way; i will investigate what's going on.

> I am not convinced that I need to do a removal of the time value from the
> cf_due_date field as most people will just use the date selector on the swag
> form. And for those who want to enter it manually, I created an example
> placeholder showing just a date. We can add the replace in the js before
> submit if it becomes an issue later.

my comment was directed at how it is formatted when it is inserted into the initial comment, not how it is displayed on the bug form.
Comment on attachment 561383 [details] [diff] [review]
Patch to add due date field for Mozilla Reps (v2)

Review of attachment 561383 [details] [diff] [review]:
-----------------------------------------------------------------

i figured out why it wasn't working for me; it was a config issue with my setup, sorry about that.

::: extensions/REMO/template/en/default/bug/create/comment-remo-swag.txt.tmpl
@@ +39,4 @@
>  
>  Shipping details:
>  
> +Ship swag before: [% cgi.param('cf_due_date') %]

for data extraction and consistency purposes it makes sense for the date to be inserted into the initial comment with the same formatting as current (ie. without the time component).  if this pans out to be more than a trivial fix i'm happy to let this pass as is.

::: extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl
@@ +73,5 @@
> +// HACK: Add a placeholder value to the due date field
> +YAHOO.util.Event.onDOMReady(function() {
> +  var due_date = YAHOO.util.Dom.get('cf_due_date');
> +  due_date.setAttribute('placeholder', '2011-04-03');
> +});

this hack probably isn't required, and can be removed.  the date picker control is enough to indicate that it's a date field.
Attachment #561383 - Flags: review?(glob) → review-
Thanks glob. Per discussion on IRC I went ahead and checked this in. Should be in the next code update. Will create the new custom field once the update has been pushed out.

1. We decided cgi.param('cf_due_date') could stay as is in comment-remo-swag.txt.tmpl
2. I removed the onDOMReady hack.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
modified extensions/BMO/lib/Data.pm
modified extensions/REMO/template/en/default/bug/create/comment-remo-swag.txt.tmpl
modified extensions/REMO/template/en/default/bug/create/create-remo-swag.html.tmpl                                                                  
Committed revision 7879.

dkl
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Sorry got impatient and wanted to get it in for tomorrows update (hopefully). I agree that it is better to have a correct history trail to refer back to if need be. Here is that patch that was checked in.

dkl
Attachment #561383 - Attachment is obsolete: true
Attachment #561642 - Flags: review?(glob)
Comment on attachment 561642 [details] [diff] [review]
Patch to add due date field for Mozilla Reps (v3)

r=glob :)
Attachment #561642 - Flags: review?(glob) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: