Last modified: 2014-10-09 22:53:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72886, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70886 - VisualEditor: In the Re-use reference dialog, search is not returning correct results on the second initialization for a specific case
VisualEditor: In the Re-use reference dialog, search is not returning correct...
Status: REOPENED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-16 16:32 UTC by Ritu Swain
Modified: 2014-10-09 22:53 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Reference list in Test2 after reusing a citation (73.07 KB, image/png)
2014-09-16 16:32 UTC, Ritu Swain
Details
Reference list in Test2 after reusing a citation (73.07 KB, image/png)
2014-09-16 16:32 UTC, Ritu Swain
Details
Reference list in Test2 (71.57 KB, image/png)
2014-09-16 16:33 UTC, Ritu Swain
Details
In Beta before reusing a citation (75.02 KB, image/png)
2014-09-16 16:34 UTC, Ritu Swain
Details
In Beta after reusing a citation (77.90 KB, image/png)
2014-09-16 16:35 UTC, Ritu Swain
Details

Description Ritu Swain 2014-09-16 16:32:10 UTC
Created attachment 16483 [details]
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.
Comment 1 Ritu Swain 2014-09-16 16:32:58 UTC
Created attachment 16484 [details]
Reference list in Test2 after reusing a citation
Comment 2 Ritu Swain 2014-09-16 16:33:39 UTC
Created attachment 16485 [details]
Reference list in Test2
Comment 3 Ritu Swain 2014-09-16 16:34:18 UTC
Created attachment 16486 [details]
In Beta before reusing a citation
Comment 4 Ritu Swain 2014-09-16 16:35:00 UTC
Created attachment 16487 [details]
In Beta after reusing a citation
Comment 5 Alex Monk 2014-09-16 19:44:40 UTC
(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...
Comment 6 Ritu Swain 2014-09-16 21:01:26 UTC
(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?
Comment 7 Alex Monk 2014-09-16 21:11:19 UTC
I had trouble understanding the second step. The screenshots didn't help me with that.
Comment 8 Ritu Swain 2014-09-16 21:35:47 UTC
(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.
Comment 9 Rummana Yasmeen 2014-09-16 21:50:41 UTC
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!
Comment 10 Ritu Swain 2014-09-16 22:59:21 UTC
(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.
Comment 11 Rummana Yasmeen 2014-09-17 21:36:47 UTC
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.
Comment 12 Rummana Yasmeen 2014-09-17 21:40:51 UTC
(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
Comment 13 Rummana Yasmeen 2014-09-19 17:54:12 UTC
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.
Comment 14 Ritu Swain 2014-09-20 05:51:56 UTC
(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.
> 
>
Comment 15 Ritu Swain 2014-09-23 15:35:56 UTC
http://youtu.be/5RjM22EfZjE
Comment 16 Alex Monk 2014-09-26 00:45:04 UTC
It does look like this is valid then, I think.
Comment 17 Alex Monk 2014-10-09 22:53:30 UTC
So I'm guessing this is related to bug 67342

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links