Closed Bug 1033010 Opened 10 years ago Closed 10 years ago

Prevent jquery datatable from overriding the initial sort order

Categories

(Webtools :: mediawiki-bugzilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

()

Details

Attachments

(1 file)

Filing this in bugzilla (original issue at: https://github.com/mozilla/mediawiki-bugzilla/issues/43) so I can set flags/track in my normal Bugzilla workflow.

glob wrote:
> if you provide an order parameter to a table, this isn't honoured in the table; it's always sorted by ID.
> 
> eg.
> 
> <bugzilla>
> {
> "keywords": "bmo-big bmo-goal",
> "keywords_type": "anywords",
> "priority": ["P1","P2","P3","P4","P5"],
> "include_fields": "id, priority, summary, status, resolution, assigned_to, keywords",
> "order": "keywords DESC, priority, bug_id"
> }
> </bugzilla>
> 
> the results are returned by bugzilla, and inserted into html in the correct order by the php plugin. they are then re-ordered by the jquery datatable, which i consider to be a bug.
> 
> as far as i can tell this can be fixed by setting aaSorting to an empty array when initialising dataTable
Attachment #8448953 - Attachment is patch: true
Attachment #8448953 - Attachment mime type: text/x-github-pull-request → text/plain
Comment on attachment 8448953 [details] [review]
PR: Disable initial jquery datatable sort

(Changed to patch=1 to appease bugzilla-todos, but that breaks the redirect)
Attachment #8448953 - Attachment is patch: false
Attachment #8448953 - Attachment is patch: true
Attachment #8448953 - Attachment is patch: false
Attachment #8448953 - Attachment mime type: text/plain → text/x-github-pull-request
Christie, do you have an idea when you might be able to take a look at this? :-)
Flags: needinfo?(ckoehler)
(In reply to Ed Morley [:edmorley] from comment #3)
> Christie, do you have an idea when you might be able to take a look at this?
> :-)

I don't, unfortunately. I'm backed up with a bunch of other tasks. 

Also, right now we don't have a way to test this without having WebOps apply directly to wiki-dev.allizom.org. 

Regular wiki working group meeting is next week and I will see if someone has time to review then.
Flags: needinfo?(ckoehler)
(In reply to Christie Koehler [:ckoehler] from comment #4)
> Also, right now we don't have a way to test this without having WebOps apply
> directly to wiki-dev.allizom.org. 

The patch is a one line change that just adds a new pref to the page inline JS. Given it only affects the UI, would you object to me working with IT to try rolling it out, and rolling back minutes later if it doesn't work?
(In reply to Ed Morley [:edmorley] from comment #5)
> The patch is a one line change that just adds a new pref to the page inline
> JS. Given it only affects the UI, would you object to me working with IT to
> try rolling it out, and rolling back minutes later if it doesn't work?

No objections. Thanks for taking that on!
Depends on: 1056090
Deployed to test in bug 1056090 and works well, so calling this fixed :-)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Attachment #8448953 - Flags: review?(ckoehler)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: