Move FormatTimeUnit() out of globals.pl in Bugzilla/Util.pm

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
14 years ago
6 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

2.19.1
Bugzilla 2.20
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

14 years ago
This should be a pretty simple move -- FormatTimeUnit() is basically just a
utility function, and can just be moved directly to Bugzilla::Util.
(Assignee)

Comment 1

14 years ago
Created attachment 170717 [details] [diff] [review]
Tested Patch for Tip

OK, here's a patch that I just made -- it was pretty easy, only BugMail.pm uses
the function at all.

There's also a duplicate function implemented in the templates at
default/bug/time.html.tmpl, in the "formattimeunit" block. It would be nice if
I could just make that code call this code. Is there a way to sensibly do that?
Attachment #170717 - Flags: review?
(Assignee)

Comment 2

14 years ago
Created attachment 170718 [details] [diff] [review]
Version 1.1

Oh, this one has the right function name in the pod docs. (I changed the
function name, by the way -- FormatTimeUnit didn't seem very intuitive to me.
Neither does this one, but I think it's a bit better.)
Attachment #170717 - Attachment is obsolete: true
Attachment #170718 - Flags: review?
(Assignee)

Updated

14 years ago
Attachment #170717 - Flags: review?
Comment on attachment 170718 [details] [diff] [review]
Version 1.1

At first, I disliked the renaming because of having to change BugMail.pm
without need. But renaming keeps Util.pm consistent in this regard, so I'd say
it's worth it.
Attachment #170718 - Flags: review? → review+
Flags: approval?

Comment 4

14 years ago
Targeting bug to 2.20 since the 2.20 feature freeze was canceled.
Target Milestone: --- → Bugzilla 2.20
Flags: approval? → approval+

Comment 5

14 years ago
Checking in globals.pl;
/cvsroot/mozilla/webtools/bugzilla/globals.pl,v  <--  globals.pl
new revision: 1.282; previous revision: 1.281
done
Checking in Bugzilla/BugMail.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/BugMail.pm,v  <--  BugMail.pm
new revision: 1.20; previous revision: 1.19
done
Checking in Bugzilla/Util.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Util.pm,v  <--  Util.pm
new revision: 1.16; previous revision: 1.15
done
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Summary: Move FormatTimeUnit() out of globals.pl → Move FormatTimeUnit() out of globals.pl in Bugzilla/Util.pm
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.