Changeset 7878


Ignore:
Timestamp:
Nov 26, 2020, 7:54:57 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2229: Synchronization filters that uses a child or parent column are not displayed correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.17-stable/src/core/net/sf/basedb/util/formatter/PropertyFilterFormatter.java

    r7774 r7878  
    8787    {
    8888      // Parent item filter
    89       String[] tmp = property.split("/");
    90       int subtypeId = Values.getInt(tmp[2]);
    91       property = tmp[3];
    92       sb.append(function("parent")).append("(");
     89      String[] tmp = property.split("/", 5);
     90      int baseIndex = 0;
     91      String parentOrChild = "parent";
     92      if (tmp.length == 5)
     93      {
     94        baseIndex = 1;
     95        parentOrChild = tmp[1].toLowerCase();
     96      }
     97     
     98      int subtypeId = Values.getInt(tmp[baseIndex+2]);
     99      property = tmp[baseIndex+3];
     100      sb.append(function(parentOrChild)).append("(");
    93101      sb.append(value(nameOfItem(dc, Item.ITEMSUBTYPE, subtypeId, false)));
    94102      sb.append(")");
Note: See TracChangeset for help on using the changeset viewer.