Edit Default System Filters

Does anyone know how to edit a system filter (My open issues default filter that shows under Issues). There appears to be two concepts of 'My Open Issues'. One is a system filter as found in that issues menu and the other is a default, but sharable/editable filter. I cannot find a way to edit the system filter and it is returning an error because the 'resolution' concept has been removed from our fields. I need a way to edit the system filter so it no longer looks at the resolution field, but the status field. Any help is appreciated.

More Detail:

I am agreeing with GeorgeCC, I am looking for a way to change this globablly, but my larger issue is I cannot change it at the user level for the system filter.

Here are some screenshots to help.

So, on the screen you can see two filters for My Open issues. The highlighted top one is the system filter. The bottom one is the one that shows up when I search for filters which I can edit.

http://img35.imageshack.us/img35/3509/issuesfiltersselection.png

And, the when I select that system filter, I get the following error because the resolution field is hidden from all users. You can see on this filter I have no cog to edit it.

http://imageshack.us/a/img841/7929/issuesfilterserror.png

These results are from the 'my open issues' links under favorites (outlined in screenshot) which loads properly because it doesn't reference the resolution field. This one can be edited unlike the system filter.

http://img560.imageshack.us/img560/337/favoritefiltersmyopenis.png

Back to the original question, how I can edit the system filter? Thanks!

9 answers

You can't edit a built-in filter, which is hard-coded, but you can trick your HTML. When you click "my open issues", you will be redirected to a custom filter of your choice.

First of all, create a custom filter, share it with everyone and write down its ID, e.g. 10454.

Then paste this code as announcement banner at /secure/admin/EditAnnouncementBanner!default.jspa:

<style>
  #announcement-banner {
    padding: 0 !important;
    border: none !important;
  }
</style>

<script>

var filterId = 'CUSTOM FILTER ID HERE';

AJS.$(function() {
  var replaceUrl = function(link) {
    var $link = AJS.$(link);
    var url = $link.attr('href');
    if (typeof url !== 'undefined') {
      var newUrl = url.replace('filter=-1', 'filter=' + filterId);
      $link.attr('href', newUrl);  
    }
  };

  var selector = '#find_link-content a[data-filter-id="-1"], a.filter-link[data-id="-1"]';
  AJS.$(document).on('mouseover', selector, function() {
    replaceUrl(this);
  });

  AJS.$(document).on('click', selector, function() {
    document.location.href = AJS.$(this).attr('href');
    return false;
  });
});

</script>

For programmers: this replaces all occurrences of links matching the given selector. There may be other places where a link to the built-in filter appears, and my hack doesn't work. If you find such place, share your selector and I will include it.

Thanks this did the trick for me. I replaced the "Reported By Me" Filter 

1 votes
Renjith Pillai Community Champion Jan 29, 2013

Oh Jenae Leahy, please do not hide the resolution field in JIRA. Many things depend on that and I would really prefer to leave it untouched. What is the issue you are facing if you have it enabled.

And the system filter, it is not editable, I am guessing it is not in any database table, it is in code - https://answers.atlassian.com/questions/125565/how-can-i-change-the-my-open-issues-filter</span<>>

Renjith, thank you for your reply. Sorry for the tardiness of mine, it has been a busy month. We prefer to hide the resolution field because it hads an extra step for the users for how they utilize JIRA. They must not only close it, but fill in a form related to resolution. For our uses, this is an uncessary step and just takes time. If I could set one resolution option and have it automatically assigned when clicking our closed status, that would be fine. Is there a way to do that?

Hi Jenae,

Install JIRA Suite Utilities and then you can add Update Issue Field as post function. Select Resolution and add it as Post Funtion.

BTW, I still need to change system default filters same reason you had. It appears I can't.

Renjith Pillai Community Champion Mar 05, 2013

Same as what Tansu said, but it does not require any plugin. JIRA itself has the option to Update Resolution during a transition in the post-function and you can avoid the extra step being done by users. So in whichever worflow transition you think that the issue is actually resolved, just set that value to any pre-fixed resolution field in the post function.

0 votes
Jason Worley Atlassian Team Jan 16, 2013

Greetings,

I extracted the following information from https://confluence.atlassian.com/pages/viewpage.action?pageId=185729481

....

System filters (My Open Issues, Reported by Me, Recently Viewed, All Issues) and your favourite filters are shown in the issue navigator. You can also find and run issue filters via the 'Manage Filters' page (see Managing your filters section below).

To perform a saved search in the issue navigator:

  1. Choose Issues>Search for Issues.
  2. Choose a filter from the filters listed on the left of the issue navigator. You will be able to choose a filter, as follows:
    • Choose a system filter —My Open Issues, Reported by Me, Recently Viewed, All Issues
    • Choose a favourite filter — Your favourite filters(listed alphabetically)
    • Search — Click the Find Filters link to search for a filter. You can search for any filter that has beenshared with you,then subscribe to it as a favourite. Once you have subscribed to a filter, it will be listed in under Favourite Filters.
  3. Once you have chosen an issue filter, the search results for the filter will be displayed. The search criteria for the filter will also be displayed.
    (info) If you choose the 'Recently Viewed' system filter, the issue navigator will switch to the advanced search. This is because basic search cannot represent the ORDER BY clause that is used in the 'Recently Viewed' system filter.
  4. You can add, remove or modify the search criteria if you want to refine the search results. You can also save the modified search criteria (if you are updating your own filter), or save a copy of the search criteria as a new issue filter.

...

Let me know if there are any questions.

Cheers,
Jason | Atlassian

I don't see how this changes the behavior of the system filter, "My Open Issues," for everyone.

The filter must be shared to everone. Otherwise the link stays the same

I am agreeing with GeorgeCC, I am looking for a way to change this globablly, but my larger issue is I cannot change it at the user level for the system filter.

Here are some screenshots to help.

So, on the screen you can see two filters for My Open issues. The highlighted top one is the system filter. The bottom one is the one that shows up when I search for filters which I can edit.

http://img35.imageshack.us/img35/3509/issuesfiltersselection.png

And, the when I select that system filter, I get the following error because the resolution field is hidden from all users. You can see on this filter I have no cog to edit it.

http://imageshack.us/a/img841/7929/issuesfilterserror.png

These results are from the 'my open issues' links under favorites (outlined in screenshot) which loads properly because it doesn't reference the resolution field. This one can be edited unlike the system filter.

http://img560.imageshack.us/img560/337/favoritefiltersmyopenis.png

Back to the original question, how I can edit the system filter? Thanks!

Does anyone have any idea here. I am pretty sure I laid out the problem pretty clearly in my comment below, but I will update the main post. Help!

Hi Jenae,

Install JIRA Suite Utilities and then you can add Update Issue Field as post function. Select Resolution and add it as Post Funtion.

BTW, I still need to change system default filters same reason you had. It appears I can't.

Edit: Oh, I missed OnDemand tag. I'm not sure this works for OnDemand

Thanks Domian Nowak, its pretty good script. but i need When i click "Assigned To Me", in Project Issues Panel Pre filter selection it redirected me to a custom filter of my choice.

0 votes
Keri Duthie Atlassian Team Nov 24, 2016

Hi Everyone, 

I have opened a feature request for this: https://jira.atlassian.com/browse/JRA-63317 - please take time to vote and add your comments to this issue. 

Cheers, 

Keri Hannon | Atlassian Support

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,907 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot