'Update a filter and return a filter Resource for it.
:param name: name of the new filter
:param description: useful human readable description of the new filter
:param jql: query string that defines the filter
:param favourite: whether to add this filter to the current user\'s favorites'

def update_filter(self, filter_id, name=None, description=None, jql=None, favourite=None):

    filter = self.filter(filter_id)
    data = {}
    data[u'name'] = (name or filter.name)
    data[u'description'] = (description or filter.description)
    data[u'jql'] = (jql or filter.jql)
    data[u'favourite'] = (favourite or filter.favourite)
    url = self._get_url((u'filter/%s' % filter_id))
    r = self._session.put(url, headers={u'content-type': u'application/json'}, data=json.dumps(data))
    raw_filter_json = json.loads(r.text)
    return Filter(self._options, self._session, raw=raw_filter_json)
