cloning a bug pre-fills mentors with "---" instead of an empty value

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: dkl)

Tracking

Production

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

4 years ago
cloning a bug pre-fills mentors with "---" instead of an empty value.
this results in a user search for "---" when the bug is submitted.
(Assignee)

Updated

4 years ago
Assignee: nobody → dkl
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
(Assignee)

Comment 1

4 years ago
Created attachment 8443494 [details] [diff] [review]
1028027_1.patch

I could not reproduce the '---' issue at all when trying to clone a bug in different ways. But this patch does add the ability to clone a bug's mentor values which was lacking before. So feel free to change the bug summary unless you can provide a more detailed way to reproduce the original issue or if this patch solves the issue anyway.

Thanks
dkl
Attachment #8443494 - Flags: review?(glob)
(Reporter)

Comment 2

4 years ago
this is easy to reproduce on production: https://bugzilla.mozilla.org/enter_bug.cgi?format=__default__&cloned_bug_id=1028027&product=bugzilla.mozilla.org&component=General

i don't see this on my dev system, even when using the production branch.
(Reporter)

Comment 3

4 years ago
Comment on attachment 8443494 [details] [diff] [review]
1028027_1.patch

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

can you please file a new bug for your patch as it isn't related to this issue.

::: enter_bug.cgi
@@ +297,5 @@
>      # BMO Bug 1019747
>      $vars->{'cloned_bug'} = $cloned_bug;
>  
> +    # BMO Allow mentors to be cloned as well
> +    #$vars->{'bug_mentors'} = join(', ', map { $_->login } @{ $cloned_bug->mentors });

this code is commented out; not sure if that's on purpose or not.
Attachment #8443494 - Flags: review?(glob) → review-
(Reporter)

Comment 4

4 years ago
(In reply to Byron Jones ‹:glob› from comment #3)
> can you please file a new bug for your patch as it isn't related to this
> issue.

bug 1029429
(Reporter)

Updated

4 years ago
Duplicate of this bug: 1030170
(Reporter)

Comment 6

4 years ago
this is happening because we don't set the 'value' variable when calling userselect.
it inherits the previous value, which on production is the new cf_fx_points field.
Assignee: dkl → glob
(Reporter)

Comment 7

4 years ago
after discussion with dkl we realised his patch here actually resolves this issue.
reassigning back to him for an updated patch.
Assignee: glob → dkl
(Reporter)

Updated

4 years ago
Duplicate of this bug: 1029429
(Assignee)

Comment 9

4 years ago
Created attachment 8446171 [details] [diff] [review]
1028027_2.patch

Fixed commented code and added cf_fx_points locally to test and worked well.
Attachment #8443494 - Attachment is obsolete: true
Attachment #8446171 - Flags: review?(glob)
(Reporter)

Comment 10

4 years ago
Comment on attachment 8446171 [details] [diff] [review]
1028027_2.patch

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

this patch is perfect for cloning bugs.
we also need to read the mentors from the query_string to fix the bookmark-template issue from bug 1029429
Attachment #8446171 - Flags: review?(glob) → review-
(Assignee)

Comment 11

4 years ago
Created attachment 8446571 [details] [diff] [review]
1028027_3.patch

Ugh sorry left that out. New patch.
Attachment #8446171 - Attachment is obsolete: true
Attachment #8446571 - Flags: review?(glob)
(Reporter)

Comment 12

4 years ago
Comment on attachment 8446571 [details] [diff] [review]
1028027_3.patch

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

r=glob
Attachment #8446571 - Flags: review?(glob) → review+
Will this also fix using "remember values as template", which currently generates a bookmark that has "---" in the mentors field?
(Assignee)

Comment 14

4 years ago
(In reply to Ed Morley [:edmorley UTC+0] from comment #13)
> Will this also fix using "remember values as template", which currently
> generates a bookmark that has "---" in the mentors field?

It will for future bookmarks but you will need to fix your currently stored bookmarks.
(Assignee)

Comment 15

4 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   e2b27e4..14adc0f  master -> master
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.