Open Bug 533604 Opened 15 years ago Updated 10 years ago

Ability to add custom URL fields

Categories

(Bugzilla :: Administration, task)

task
Not set
normal

Tracking

()

People

(Reporter: altlist, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Request the ability to add custom URL fields, rather than being restricted to just one URL field.  In my case, I need three custom URL fields.
Attachment #435943 - Flags: review?(LpSolit)
Comment on attachment 435943 [details] [diff] [review]
Patch to add a custom url field

Redirecting to mkanat as he will probably review the other bug too (about making it a custom type).
Attachment #435943 - Flags: review?(LpSolit) → review?(mkanat)
Blocks: 577842
Comment on attachment 435943 [details] [diff] [review]
Patch to add a custom url field

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

::: Bugzilla/Field.pm
@@ +144,4 @@
>      # Using commas because these are constants and they shouldn't
>      # be auto-quoted by the "=>" operator.
>      FIELD_TYPE_FREETEXT,      { TYPE => 'varchar(255)' },
> +    FIELD_TYPE_URL,      { TYPE => 'varchar(255)' },

URLs can be pretty long; this should probably be a MEDIUMTEXT.

::: importxml.pl
@@ +1056,5 @@
>              push(@values, clean_text($value));
> +        }elsif ($field->type == FIELD_TYPE_URL) {
> +            push(@query, $custom_field);
> +            push(@values, clean_text($value));
> +        }elsif ($field->type == FIELD_TYPE_TEXTAREA) {

Nit: Spaces after the }'s.

::: template/en/default/bug/field.html.tmpl
@@ +70,4 @@
>  [% Hook.process('start_field_column') %]
>  [% IF editable %]
>    [% SWITCH field.type %]
> +[% CASE constants.FIELD_TYPE_URL %]

The indentation of this block is all wrong. Look at how the rest of this file is indented.

@@ +79,5 @@
> + (<a href="#" id="url_edit_action" >edit</a>)</span>
> + <span id="url_input_area" class="bz_default_hidden" >
> + <input id="[% field.name FILTER html %]" class="text_input" name="[% field.name FILTER html %]"
> + value="[% value FILTER html %]" size="40" maxlength="[% constants.MAX_BUG_URL_LENGTH FILTER none %]">
> + </span>

This is hard to read, so I'm not really sure what's going on. If you fix the indentation and make it easier to read, I'll comment on the functionality.

Is this identical to what the bug_file_loc field is doing now?

::: template/en/default/global/field-descs.none.tmpl
@@ +54,4 @@
>  
>  [% field_types = { ${constants.FIELD_TYPE_UNKNOWN}       => "Unknown Type",
>                     ${constants.FIELD_TYPE_FREETEXT}      => "Free Text",
> +                   ${constants.FIELD_TYPE_URL}      => "URL Field",

Internal indentation needs to match the other lines.
Attachment #435943 - Flags: review?(mkanat) → review-
(In reply to hariniachala from comment #1)
> Created attachment 435943 [details] [diff] [review]
> Patch to add a custom url field

Hariniachala, thank you very much for providing this patch.
It would be great if you could do the nitfixes requested by comment 5, to move this bug forward with your patch.

Being a volunteer myself, I'm not sure what could possibly cause a workflow problem where it took almost 1 year and a half (16 months) to get this patch reviewed (and why there's no explanation or apology for that fact). I'm sorry if this has caused justified frustration. Yet I'm sure your continued contribution will be appreciated by everyone.

Otherwise, if you don't want to continue working on this bug, please unassign yourself.
Assignee: general → hariniachala
Whiteboard: [needs revised patch]
(In reply to Thomas D. from comment #6)
> (In reply to hariniachala from comment #1)
> > Created attachment 435943 [details] [diff] [review]
> > Patch to add a custom url field
> 
> Being a volunteer myself, I'm not sure what could possibly cause a workflow
> problem where it took almost 1 year and a half (16 months) to get this patch
> reviewed (and why there's no explanation or apology for that fact).

My maths ain't right: fwiw, it took *more* than 1 year and a half (more than 18 months!), starting from the first two review requests, until this patch was first reviewed.
Assignee: hariniachala → administration
Component: Bugzilla-General → Administration
Whiteboard: [needs revised patch]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: