Page MenuHomePhabricator

In the Re-use reference dialog, search is not returning correct results on the second initialization for a specific case
Closed, InvalidPublic

Assigned To
None
Authored By
Swainr
Sep 16 2014, 4:32 PM
Referenced Files
F14816: test1.png
Dec 9 2014, 2:23 AM
F14818: test3.png
Nov 22 2014, 3:46 AM
F14819: beta1.png
Nov 22 2014, 3:46 AM
F14820: beta2.png
Nov 22 2014, 3:46 AM
F14817: test2.png
Nov 22 2014, 3:46 AM

Description

Reference list in Test2 after reusing a citation

Environment- Test2, beta, production

1> Have at least 4-5 citations on the page.
2> Cite Re-Use -> in the resulting dialog sort the citations by their numbers. They get sorted.
3> Now Re-Use an existing citation, it gets added to the page. Repeat step# 2.
4> Notice now the first and second citations are not sorted by their numbers anymore.
See screenshots.

In Test2 the first two items are not getting sorted.In beta and production, only the first item is not getting sorted.


Version: unspecified
Severity: normal

Attached:

test1.png (504×1 px, 73 KB)

Details

Reference
bz70886

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:46 AM
bzimport set Reference to bz70886.

Created attachment 16484
Reference list in Test2 after reusing a citation

Attached:

test2.png (504×1 px, 73 KB)

Created attachment 16485
Reference list in Test2

Attached:

test3.png (504×1 px, 71 KB)

Created attachment 16486
In Beta before reusing a citation

Attached:

beta1.png (632×1 px, 75 KB)

Created attachment 16487
In Beta after reusing a citation

Attached:

beta2.png (632×1 px, 77 KB)

(In reply to Ritu Swain from comment #0)

2> Cite Re-Use -> in the resulting dialog sort the citations by their
numbers. They get sorted.

What? The re-use citations dialog doesn't let you sort... It's sorted by numbers already...

(In reply to Alex Monk from comment #5)

(In reply to Ritu Swain from comment #0)

2> Cite Re-Use -> in the resulting dialog sort the citations by their
numbers. They get sorted.

What? The re-use citations dialog doesn't let you sort... It's sorted by
numbers already...

did you follow all the steps and saw the screenshots?

I had trouble understanding the second step. The screenshots didn't help me with that.

(In reply to Alex Monk from comment #7)

I had trouble understanding the second step. The screenshots didn't help me
with that.

The screenshots were taken after doing step#3,which show clearly when you enter "1"/ "2" to search by the first/second item in the list, they do not get sorted.

Ritu,you cannot sort the citations inside Re-use dialog, so the step 2 is kind of confusing.Maybe you are referring to something else.If you could rephrase the issue here again with a clear example of what you are expecting as a result, it will be very helpful.

Thanks!

(In reply to Rummana Yasmeen from comment #9)

Ritu,you cannot sort the citations inside Re-use dialog, so the step 2 is
kind of confusing.Maybe you are referring to something else.If you could
rephrase the issue here again with a clear example of what you are expecting
as a result, it will be very helpful.

Thanks!

yes,I can sort the citations inside Re-use dialog by their numbers.The steps above are mostly what it is.Let me give you an example here- In Test2

1> Select to insert 5 different book citations.In each of these citations don't fill in the "Title" field(which is required). I filled in the "Last Name".

2> With the entry of the 5th citation it is highlighted on the page, so click somewhere on the page to move focus.

2> now open cite -> Re-use

3> the Re-use dialog opens, populated with the existing citations by their numbers beside it.
4> Now type in the number "1" in the input box.Only that particular numbered citation(#1) and its details gets displayed in the Re-use dialog and no other citations.Like this- "[1]Empty citation(help)".

5> you can repeat the step#4 to check for other numbers. Say, enter "2"
and only citation at #2 and its details get displayed and likewise.When you don't have anything in the input box, it displays all the citations.

6>now select to re-use a citation.say, citation listed at #1. It gets added to the page as "[1]" and is highlighted.click anywhere on the page to move the focus.

7> Select Cite Re-use.In the Re- use dialog, again type in "1" in the input box.Notice when you do that, all the citations remain displayed, whereas the dialog should display only the citation at #1(as it happened in the step#4).

Enter "2" in the input box, again all the citations remain displayed, whereas the dialog should display only the citation at #2.

But if you type in "3", "4" and "5" you will notice that the citation at that number gets displayed only and no other citations.

Actual behavior- In the Re-Use dialog the citations are not sorted by their numbers once a citation has been re-used and the Re-use dialog is initialized for the second time.

Expected behavior - sorting of citations in the Re-use dialog should remain the same.

All the other details about environment and the related findings remain the same.

So the issue here is actually about the reference search not working properly inside Re-use dialog when you do it for the second time.

Also another pre-requisite to reproduce this bug is, you need to keep the required field empty when you add that citation.So that it appears as "[1]Empty citation(help)"

Follow the steps to reproduce:

1.Add 2 citations on Books.
2.Leave the required field Title empty
3.Now go to Re-Use dialog
4.Type in 1 or 2 .At this step you will get the correct search result [1] and [2] respectively
5.Now re-use one of them
6.Again open the Re-use Dialog
7.Type in 1 or 2

Observed Result:
Search seems to not working properly, it returns all the citation when you actually searched for a citation that 1 in it.

(In reply to Rummana Yasmeen from comment #11)

So the issue here is actually about the reference search not working
properly inside Re-use dialog when you do it for the second time.

Also another pre-requisite to reproduce this bug is, you need to keep the
required field empty when you add that citation.So that it appears as
"[1]Empty citation(help)"

Follow the steps to reproduce:

1.Add 2 citations on Books.
2.Leave the required field Title empty
3.Now go to Re-Use dialog
4.Type in 1 or 2 .At this step you will get the correct search result [1]
and [2] respectively
5.Now re-use one of them
6.Again open the Re-use Dialog
7.Type in 1 or 2

Observed Result:
Search seems to not working properly, it returns all the citation when you
actually searched for a citation that 1 in it.

that has "1" in it

The reason it is showing the other citations awhen you search for "1" is because it is searching through the URLS of the citations as well and that contains a link to the page Help:CS1_errors when you dont fill up any required field.So, this is kind of by design.

Also, since now we are going to show a confirmation dialog that indicates explicitly to user that they are not filling up those required field,this will turn out to be a very edge case.

Therefore,marking it as Invalid for now.

(In reply to Rummana Yasmeen from comment #13)

The reason it is showing the other citations awhen you search for "1" is
because it is searching through the URLS of the citations as well and that
contains a link to the page Help:CS1_errors when you dont fill up any
required field.

I understand your point here.But,

When the citation is not re-used and you search by any number , say- "1" then it returns only the #1 citation(it won't display all the citations then) . So by design the search results would be different for Re-used and not re-used citations.

Again,after re-using any citation, it is only the first two citations, for which you get all the citations in the result , but if you type in a different number , say 3 to search for the #3 citation then it would not return all the citations with Help page link.

So, this is kind of by design.

yes.

It does look like this is valid then, I think.

So I'm guessing this is related to bug 67342

Jdforrester-WMF set Security to None.
Jdforrester-WMF renamed this task from VisualEditor: In the Re-use reference dialog, search is not returning correct results on the second initialization for a specific case to In the Re-use reference dialog, search is not returning correct results on the second initialization for a specific case.Dec 9 2014, 2:34 AM
Jdforrester-WMF removed Krenair as the assignee of this task.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

I've just reviewed the video again and the only strange behaviour I see is when you type '2' and get all of the results back. I don't get that on my local wiki, can you still reproduce it?

I can reproduce it only when I type '1'.But, like you said, typing '2' does not return all. Only the reference at #2 is returned.

Type '1' in the reference search box and compare the behavior, before and after reusing any reference from the list.I found disparity in the returned results.

Before re-using any reference typing '1' returns only the reference at #1.
After re-using, typing '1' returns all the references in the list.