Disable preset filters or edit them

Sascha Werheid February 4, 2013

Hi,

we want to change the preset filters and remove all or some old filters like "Outstanding" or "Resolved recently" because we dont use the resolved field in our workflow and these filters don't work for us.


In this Issue https://jira.atlassian.com/browse/JRA-10942 Atlassian wrote that it is possible

"disable system default filters (through the admin plugins section)"

I found "Preset Filters Sections" under Manage Plugins -> System Add-ons, but I cant disable it.

Is their another way to disable the preset filters or to change them?

We use Jira 5.2.

4 answers

1 accepted

1 vote
Answer accepted
MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Just a word of warning... if you don't use the resolution field, then lots of other areas of Jira may not behave as expected. It's up to you but for me, it's not a good idea.

Anyway, Renjith's answer is right, you have to disable the "Preset Filters section" plugin but you can't do it via the UI (Administration > Plugins> System Plugins > Preset Filters Section > Manage plugin modules) as it's one of the few plugins you can't manage through the UI.

The only other solution would be to extract the plugin from the Jira install, change the atalssian-plugin.xml and take out the modules you didn't want & restart. Haven't tested it but it *should* work

if you want to add more links you'll need a plugin, here is the doco

https://developer.atlassian.com/display/JIRADEV/How+to+create+a+custom+preset+filter

MatthewC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Actually, I take it back... there is another way....

You can just hide the preset filters you want by using jquery. The plugin is stil there and you don't have to do a SQL update. It also works on a project by project basis and you don't need to do it site wide! Double bonus!

Put this code into your project description field and it will be activated only on the project sumary screen. It's not been widely tested, it may have an impact on the project list admin screen, not sure but worth a try. This example just leaves the All menu in place. Havent tested in 5.2 but let me know.

<script type="text/javascript">
AJS.$(document).ready(function() {
    AJS.$("#filter_resolvedrecently").hide();
    AJS.$("#filter_outstanding").hide();
    AJS.$("#filter_addedrecently").hide();
    AJS.$("#filter_unscheduled").hide();
    AJS.$("#filter_updatedrecently").hide();
    AJS.$("#filter_assignedtome").hide();
    AJS.$("#filter_mostimportant").hide();
    AJS.$("#filter_reportedbyme").hide();

});
</script>

0 votes
Sascha Werheid February 4, 2013

We use Done but if I can't filter on resolution: "This criteria is not valid for the project and/or issue type"

Maybe the greenhoper workflow dosn'T support it or its because we hide it in ower field config.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

How about this, no guarantee from my side ;)

  1. Delete the line jira.webfragments.preset.filters from WEB-INF/classes/com/atlassian/plugin/metadata/application-required-plugins.txt
  2. Run the below SQL (make a DB backup before doing this)
  3. Restart JIRA

insert into propertyentry values (989898,'jira.properties',1,'jira.plugin.state-.jira.webfragments.preset.filters',5);

insert into propertystring values (989898,'false');

Sascha Werheid February 4, 2013

mmh I don't think thats the way atlassian want us to disable the preset filter, but I will try it on our test system if i found out how to insert data in a HSQL Memory DB..

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

There is no accetable way from Atlassian to disable this and disabling like this is not really adviced. And hiding of resolution field is also not a recommended stuff from Atlassian.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

While this is not an answer, I was wondering whether at any point, you mark an issue as done? If yes, the resolution field is valid. Any specific reason why you are not using it?

Suggest an answer

Log in or Sign up to answer