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

This widget could not be displayed.

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 

Hi@Ozan Bayram 

Can you tell exactly how it worked for you?

I tried the same and it's not working, and i really need this

 

EDIT:

This changed the "my open issues" filter, from the "issues" menu in the main Jira navigator.

I thought it will replace it in the "issues" panel on the left when you go in to the project page.

Is there a way to do it? @Damian Nowak3

Hi @Nir Haimov i just used the script to replace my "reported by me"  filter

For this issue. I created a new filter and get the id of it. And put into the script

Then i changed replace code for filter id "-2"

Then i added the script to admin panel > system > user interface >Announcement Banner

This changed both. Top menu and the left menu

Left menu

jira-menu-Picture1.png

Top menu

jira-menu-Picture2.png

Here is the final code

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

<script>

var filterId = '13209';

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

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

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

</script>

Please note that there is two lines to replace

var newUrl = url.replace('filter=-2', 'filter=' + filterId);
  var selector = '#find_link-content a[data-filter-id="-2"], a.filter-link[data-id="-2"]';

 

 

Hope this helps.

Hi @Ozan Bayram

I wanted to change the default filter inside the "issues" menu inside the project (see attached)

Couldn't find a way to do it... any suggestions?1.png

When i clicked that link it navigates to a link like this "?filter=myopenissues"

Maybe you could give a try to replace that one

but i dont think this is possible

Yeah,

It's not possible, though you came up with a way to accomplish that 

Thanks any way :)

@Damian Nowak3@Ozan Bayramis there a way to extend this workaround to the Switch filter dropdown menu?

2018040511_23_10.png

don't know but maybe same solution can be applied. Basically you need to find what do you want replace and change the script

Thank you Ozan.

Actually I don't know where to search for the tags I need. Is there any documentation or something like that to search for them?

This widget could not be displayed.

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.

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.

This widget could not be displayed.
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

This widget could not be displayed.
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

This widget could not be displayed.

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

This widget could not be displayed.

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!

This widget could not be displayed.

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!

This widget could not be displayed.

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

This widget could not be displayed.

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.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

169 views 2 0
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