Roundup Tracker - Issues


Author rouilj
Recipients rouilj
Date 2019-07-11.02:38:23
Message-id <20190711023819.69E474C02E1@itserver6.localdomain>
Search filters in roundup can be transitive.  From

  ... e.g. you can search
  for all issues where a message was added by a certain user in
  the last week with a filterspec of
  {'' : '42', 'messages.creation' : '.-1w;'}

so in theory I should be able to submit a rest call as:


however the current code balks at that. Stating ""
isn't a valid property of issue. I wonder if we should rework the code
in that does:

    prop = class_obj.getprops()[key]
  except KeyError:
    raise UsageError("Field %s is not valid for %s class."%(
          key, class_name))

to something like:

    prop = class_obj.getprops()[key.split('.')[0]]
  except: ...

This should result in:

   obj_list = class_obj.filter(None, filter_props)

getting filter_props like:

  {'', [1]}

which I think is properly handled.

Two questions:

  1) Does this seem the right thing to do? Should we support
     transitive searching in the rest interface? I don't see any
     reason it's not restful. It certainly beats searching
     messages?author=42&creation=.-1w then searching
     issues?messages=123,345,678 etc. (speaking of which
      curl ',2'
      returns all messages for some reason, so we may have
      another bug.)

  2) Does this seem to be the right way to implement it? Given a
     filter of, should we check the whole link
     chain and validate the property, or do we just rely on filter
     raising an error if the filter is nonsense?
Date User Action Args
2019-07-11 02:38:23rouiljsetrecipients: + rouilj
2019-07-11 02:38:23rouiljlinkissue2551051 messages
2019-07-11 02:38:23rouiljcreate