How to create a ticket for `QuerySet.extra`?

I was making an update to some code that uses QuerySet.extra and needed to consult the docs. When I was reading the section on extra(), I saw this:

If you do need to use [extra()], please file a ticket using the QuerySet.extra keyword with your use case

So I decided I would do that, just to be sure my use-case would be covered in the future… But when I clicked the “file a ticket” link, it told me I don’t have the required permissions and prompted me to log in, but when I clicked the login link, I saw no link to create an account, and I don’t have one, so what should I do.

It also suggests I look through the tickets. I just did and I didn’t see my issue there, at least not based on the ticket names. In short, I needed to sort duration fields to get the largest duration (last record), but when some fields are null, they are always placed at the end, whether or not I added .asc(nulls_last=False) - nulls were always ending up last. So I used extra() to create an “is null” field in the select and added an order_by that specified the nulls to be first and the duration value to be ordered second.

I’d also tried (without success) to use .annotate to create the field, but at the time, I couldn’t get that to work either.

That said, I originally developed the code in 3.2. Would you guys know if this is an issue that has been fixed?

You’re addressing at least three different topics here.

What is the issue that you’re requesting asistance with?

If you’re asking about creating an account to create an issue, see Getting involved.

If you’re having problems getting the sort to work, please provide the model and the query you’re trying to create.

Also, from the 4.1 Release notes:

  • The ability to pass nulls_first=False or nulls_last=False to Expression.asc() and Expression.desc() methods, and the OrderBy expression is deprecated. Use None instead.

and then from the 5.0 Release notes:

  • Passing nulls_first=False or nulls_last=False to Expression.asc() and Expression.desc() methods, and the OrderBy expression is no longer allowed.

I was just trying to do what the docs suggested I do: create a ticket if you need to use extra().

My problem was solved by the use of extra over a year ago, but I provided some extra information about the problem I’d encountered a year ago, based on my documentation of my code, with the intent to see if submitting the report isn’t necessary.

If that’s not an easy question to answer, then let’s not worry about solving the year-old problem and I can just create the ticket. It can be addressed there.

The request in the doc is pretty straightforward: submit a ticket with your use case and tag it with QuerySet.extra. Is there a form for account creation you can directly link me to?

Yes, you have a couple of options - both detailed at Getting involved