8 Jira Administrators' maintenance tasks

By in
8 Jira Administrators' maintenance tasks

I know that creating projects, designing flows, scripting or automation are the things that many administrators like the most. But every instance needs some cleanup from time to time as well. To be sure that your Jira is doing good, focus on the routine administrator tasks. In this post I`m providing you the checklist, that`s gonna help you keep your environment healthy.

While creating this checklist for you I found a great article on the same topic. Therefore here is the mixture of Atlassian experts’ knowledge and my own experience. You are welcome to share your tips on maintaining Jira in a good condition. Just drop a comment below.

1. Integrity checker
2. Mail queue
3. Resolutions
4. Unused projects
5. Inactive users
6. Unused elements
7. Unused customfields
8. Upgrade

Prerequisites

  • place an Annoucement Banner. If your work is going to affect production environment it`s good to inform users.
  • add your email address to the periodic scan recipients list (YOUR_JIRA_URL/plugins/servlet/troubleshooting/view/). It will be sending you reports based on a regular scan of your Jira instance.
  • periodically create an issue with Jira maintenance task list.
  • 1. Integrity checker

    Due to the intensive Jira use, some data can slip out of control and land in an inconsistent state. To make things straight again use Integrity checkers. There are couple of areas to verify such as workflows, statuses etc. It`s good to do all of them. But in larger instances there`s a need to run checkers separately to avoid timeout errors.

    2. Mail queue

    If you don`t monitor error mail queue you need to check it manually from time to time. If you find some messages there, it can be a sign of some misconfiguration. Just open the administrator menu (“.” or “gg” on a keyboard) and type “mail queue”.

    3. Resolutions

    Remember that until the Resolution is set, Jira treats that issue as opened. You need to check two cases here:

    • Resolution is empty despite the task is closed. Use following jql:
    statusCategory = Done and resolution is EMPTY

    Or if your Jira instance has multiple statuses in the category of “Done” and not all of them are the last statuses of the workflow, then you have to use specific names such as:

    status = Closed and resolution is EMPTY

    If jql query returns some issues, it means that one or more of your workflows need a fix. Its last transition should set the resolution via Resolve Issue Screen or by postfunction.

    • Resolution is set despite the task is opened.
    resolution is not EMPTY and statusCategory in ("To Do", "In Progress")

    Everytime the task is being transitioned out from the last status (i.e. Closed) it should has its Resolution field cleared.

    4. Unused Projects

    Another way to maintain Jira`s high performance is archiving unused projects. While it`s an built-in feature of Jira Cloud, you need to make some preparation on Jira Server environment. You can, for example, prepare a special permission scheme, that allows the access to a project only for Jira Administrators. That will remove all issues of such project from jql query results for the rest of users. It`s good idea to create separate category, i.e. Archived Projects. Let`s say you`ve already done that. How to determine which projects should be archived next? That`s how:

    "Project category" != "Archived projects" ORDER BY key ASC, updated DESC

    If the last update was, let`s say, a year ago, you can consider such project as a candidate for archiving.

    Plugins that can help

    Project Archiver for Jira
    Cleaner for Jira

    5. Inactive users

    Save your licenses! Usually there`s no need to keep long-time-no-used accounts active while somebody else could use it. With following SQL you can list all users ordered by last login date.

    SELECT d.directory_name AS "Directory",
    u.user_name AS "Username",
    u.active AS "Active",
    u.email_address AS "E-mail",
    to_timestamp(CAST(attribute_value AS BIGINT)/1000) AS "Last Login"
    FROM cwd_user u
    JOIN (
    SELECT DISTINCT child_name
    FROM cwd_membership m
    JOIN licenserolesgroup gp ON m.parent_name = gp.GROUP_ID
    ) AS m ON m.child_name = u.user_name
    JOIN (
    SELECT * FROM cwd_user_attributes ca
    WHERE attribute_name = 'login.lastLoginMillis'
    ) AS a ON a.user_id = u.id
    JOIN cwd_directory d ON u.directory_id = d.id where u.active=1
    ORDER BY "Last Login" ASC;

    You can find more details on this solution here.

    Plugins that can help

    User Deactivator for Jira
    Active User Filter
    User Management for Jira
    Cleaner for Jira

    6. Unused elements

    Forgotten screens? Abandoned workflows? Every scheme has an “inactive” section where you can find elements which are not bounded with any project. If they don’t wait for some better days to be used, delete them. Just hit the dot (.) on your keyboard to open the admin menu and go directly to the schemes page.
    Elements you want to check:

    • Workflows & Workflow Schemes
    • Screens, Screen Schemes & Issue Type Screen Schemes
    • Issue type schemes
    • Permission schemes
    • Notification Schemes

    Note that in order to delete a screen, it should not be assigned to any Screen Scheme. And the latter shouldn’t be attached to Issue Type Screen Scheme, which in turn shouldn’t be assigned to a project. Simple as that:) Workflows has similar configuration here.

    7. Unused customfields

    Following query gives us customfield names, ids and amount of issues where the fields has some value.

    SELECT CF.cfname, CF.id, count(CV.ISSUE) FROM customfield CF join customfieldvalue CV on CF.ID = CV.CUSTOMFIELD
    group by CF.id order by count;
    

    Then we can pick the ones with no value at all and delete it. Remember to check places such as Dashboards, Filters, Screens and Workflows (and custom scripts) to determine if the field is not used anywhere. Let’s assume that the name of a customfield we want to check is Team and it has an id of 10000. Run following queries against your database.

    Dashboards and gadgets
    SELECT * FROM gadgetuserpreference
    INNER JOIN portletconfiguration ON portletconfiguration.id = gadgetuserpreference.portletconfiguration
    INNER JOIN portalpage ON portalpage.id = portletconfiguration.portalpage
    WHERE
    userprefvalue LIKE '%10000'
    
    Filters
    select * from searchrequest s where s.reqcontent like '%Team%' or s.reqcontent like '%cf[100000]%'
    
    Screens
    SELECT cf.id, fsli.fieldidentifier, cf.cfname, fs.name, fst.name FROM fieldscreenlayoutitem fsli
    INNER JOIN fieldscreentab fst
    ON fsli.fieldscreentab = fst.id
    INNER JOIN fieldscreen fs
    ON fst.fieldscreen = fs.id
    INNER JOIN customfield cf
    ON fsli.fieldidentifier = 'customfield_' || cf.id::text
    WHERE fsli.fieldidentifier LIKE '%customfield_100000%'
    Workflows
    select * from jiraworkflows wf where wf.descriptor like '%customfield_100000%';
    
    Plugins that can help

    Custom Fields Usage for Jira
    Admin Tools for Jira
    Cleaner for Jira

    8. Upgrade

    Applications Upgrade

    Go to Manage Apps section and check for which plugins there is an update available. Your checklist here:

    • check application license validity
    • upgrade/release notes of an app
    • (optional) remove plugins cache
      • Stop the JIRA instance
      • Delete JIRA_HOME/plugins/.bundled-plugins and JIRA_HOME/plugins/.osgi-plugins folders
      • Start JIRA
    Upgrade Jira

    Just read the article from jiraforthepeople.com.

    Good luck! Comments and suggestions are welcome;)

One Comment
Leave a reply

Your email address will not be published. Required fields are marked *