Opened 3 years ago

Closed 3 years ago

#18125 closed Bug (fixed)

Using filters in if tag example is misleading

Reported by: ebrelsford@… Owned by: nobody
Component: Documentation Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the template language documentation, there is an example where the length filter is used in an if tag where a list's length is compared to 1. It starts with "You can also use filters and various operators in the if tag..."

Since the filter returns a string and the comparison will be a string comparison, this basically works in the example but anything more complicated is likely to fail. I think it would be helpful if a caveat was written into this example that made this clear.

Attachments (1)

filters_in_tags.diff (586 bytes) - added by ebrelsford@… 3 years ago.
patch to add caveat

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by ebrelsford@…

  • Component changed from Uncategorized to Documentation
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Type changed from Uncategorized to Bug

comment:2 Changed 3 years ago by jezdez

  • Triage Stage changed from Unreviewed to Accepted

Sounds like a good idea, feel free to write the caveat.

Changed 3 years ago by ebrelsford@…

patch to add caveat

comment:3 Changed 3 years ago by ebrelsford@…

  • Has patch set

I've attached my attempt at making a caveat. I'm new at contributing and documentation, so please let me know if I need to change anything.

comment:4 Changed 3 years ago by oinopion

  • Triage Stage changed from Accepted to Ready for checkin

Patch looks good to me.

comment:5 Changed 3 years ago by Aymeric Augustin <aymeric.augustin@…>

  • Resolution set to fixed
  • Status changed from new to closed

In [06ea10e1f19ec311f4f6c71d5446c12e92807497]:

Fixed #18125 -- Explained caveat with filters

Thanks ebrelsford AT gmail.com and oinopion.

Note: See TracTickets for help on using tickets.
Back to Top