Allow a user's filter to override the configured filter.

Issue #1194 resolved
Mike Curwen created an issue

In your configuration document, there's a section that reads:

Or there is super flexible trick, e.g. JQL: filter = "Sticky Issues for Timesheet". So everyone can create a filter with this name, to whatever he or she wants. If filter does not exist for a user, nothing happens. Also you can share filters with certain users or groups to simplify their lives.

So i've just set up and globally shared a filter named 'My Timesheet Issues' containing the JQL that used to be in the gadget config. Then in the gadget config, the JQL now reads filter="My Timesheet Issues". So that works for everyone.

Then I logged in as a test user and created (actually 'Saved As' the shared global filter) my own filter named the same, and used completely different JQL. But their timesheet gadget contains the same issues as the shared filter.

I've fiddled around with just executing the JQL directly, and the auto-complete suggestions that come up for the test user include two filters named "My Timesheet Issues" but regardless of which one I select, it gives me the results of the shared one. IF I type in the filter=<id> then I get the correct result, but obviously IDs are not a solution. There must be something internal in JIRA's JQL impl that disambiguates filters by name. Is it possible to control this? If so, would you consider making this feature work as described? (have an Admin user define the default impl of the filter, but allow users to override it).

Another way to accomplish the same thing, but that I'm assuming has its own rather large side effects, is to 'move' the filter setting from the back-end Configuration and make that JQL settable on a gadget config. Such that, each user can config their own JQL directly, even per-gadget instance.

Comments (3)

  1. Mike Curwen reporter

    ha ha. the lightbulb just went off for me.

    The built-in behavior is exactly what we'd actually want. I had already dismissed in my mind the capability to define a set of static timecodes that would always be there, plus whatever custom ones they added, because of how I presumed the JQL filter name selection would work. I had thought "since I can't control what JQL a user types in, and can't force them to include all our static time codes, I have to satisfy myself that the gadget will show their tickets only".

    But of course, with how the JQL does additive results, I get exactly what I wanted in the first place.

    please forgive this noise! :)

  2. Andriy Zhdanov

    Hi Mike,

    No problem, that's interesting, and sorry for late reply.

    I'm glad you have figured it out, just let me add also, that one can select filter in gadget configuration, and enable Show Empty Rows option, and it will have similar and additive effect too.

    Thank you.

  3. Log in to comment