View Issue Details

IDProjectCategoryView StatusLast Update
0026761mantisbtfilterspublic2022-01-16 05:45
Reportersadovsf Assigned Toatrol  
Status closedResolutionunable to reproduce 
Product Version2.23.0 
Summary0026761: Relationship filtering not working properly for none case

I need to filter all "root" tasks for specific target version. This should be quite simple filter:

Relationship:  child of none (type child, id -2)
Target version: My_product_version

This works but only as long as no child task have target version set to My_product_version. When this happens such task will be output as result of filter along with roots although it does have relationship of type child to some other task

Steps To Reproduce
  1. Create 2 tasks:

    • Parent_task with target version set to My_product_version (can be any version used later in filter)
    • Child_task with target version set to My_product_version (can be any version used later in filter)
  2. Add child of relationship so created tasks are in hierarchy (Parent_task will have relationship parent of to Child_task).

  3. Create new filter according to description

  4. You will see both tasks being output to table

Wanted state:
Only Parent_task visible in table

Additional Information

Attached files are:

  • Filter used to achieve described result
  • IDs of bug output to result table
  • Relationship details of what is Child_task in this case (you can see it has child relationship to other bug in results (Parent_task)
TagsNo tags attached.
Attached Files
image.png (18,205 bytes)   
image.png (18,205 bytes)   
image-2.png (6,418 bytes)   
image-2.png (6,418 bytes)   
image-3.png (7,148 bytes)   
image-3.png (7,148 bytes)   




2020-03-04 14:20

developer   ~0063731

No time to check myself at the moment, but this might be already fixed in next version 2.24.0, see 0026621
You could try a nightly build



2020-03-06 19:22

developer   ~0063734

@sadovsf I am curious about the dark background shown on the snapshot, how did you end up with a dark theme?



2020-03-07 02:33

reporter   ~0063735

Iam actually working on quite a big client side application for planning and project overview. Part of it being own fast php api for mass operations in mantis and part typescript api for client side of things. Results are ability to download thousands tasks from dB into client side app and work with it locally with indo redo support and stuff. Then you hit save and everything gets. Stored in mantis.

Part of this was request from our employees to have dark theme so I did reskin of whole mantis and add button to switch themes into mantis toolbar using simple js code. Thanks to this we now have slightly better looking light and dark themes that works everywhere.

It's not yet finished but if you would like to I could probably share CSS along with js that handles switching in forum of simple plugin maybe �



2020-05-21 10:51

developer   ~0064017


I tried latest version and was not able to reproduce using the given information.

Feel free to reopen the issue at a later time if you should still encounter the problem after upgrading.



2021-12-10 09:30

reporter   ~0066069

I have to say that even on 2.25.2 filtering by relation with bug None is not working properly. Unfortunatelly i cannot identify what is different from those that work :-(



2021-12-10 09:34

reporter   ~0066070

Here is another example of such case

obrazek.png (274,302 bytes)   
obrazek.png (274,302 bytes)   
obrazek-2.png (118,413 bytes)   
obrazek-2.png (118,413 bytes)   


2021-12-10 14:31

developer   ~0066072

I am not able to reproduce using the given information.
Please provide step by step instructions starting from a fresh installaton of 2.25.2.

Also confusing: You started with "child of none" relationship when intering the issue, now there is "blocked by none" in your new screenshots.
"blocked by" is not a standard relationship of MantisBT.



2021-12-17 02:20

reporter   ~0066077

We have to find what is causing it then. For us having couple thousand tasks it is hapening for some of them. There was a theory from one colegue that child-parent is returning tasks that are "in the middle" meaning have parent and have child. I did not test that theory yet though. About different relation. Yes blocked by is custom one with id 1001 and 1000 for is blocking (oposite of blocked by). It works properly and its shown here more for a purpose of showcasing that same issue applies to other relations not only parent-child but possibly to all of them



2021-12-17 08:03

reporter   ~0066079

OK so one of our testers managed to find simple repro:
1) Create 3 tasks (content is not important)
2) Set task 1 to be parent of task 2
3) Set task 3 to be duplicate of task 1
4) Reset filter in View Issues and set only "parent of none"
5) Result will contain all 3 tasks although task 1 is parent of task 2 and should not be in results because we are looking for only tasks that does not have any child tasks.

Let me know if you manage to repro it as well please.



2021-12-18 11:56

developer   ~0066081

I tried according 0026761:0066079
I am not able to reproduce.
My result list shows just Task 2 and Task 3



2021-12-30 04:18

developer   ~0066132

@sadovsf, I was not able to reproduce.
Feel free to reopen.
When doing so, please provide step by step instructions starting from a fresh installaton of 2.25.2.



2022-01-03 09:50

reporter   ~0066136

Last edited: 2022-01-03 09:51

Could it be database issue maybe? We have this problem on both of our instances we are using internaly.
We use DB:
Database Version, Description 10.3.29, 10.3.29-MariaDB-0+deb10u1
Database Driver mysqli



2022-01-03 11:01

developer   ~0066137

You can enable database logging and look at the statements that are executed in function filter_get_bug_rows.