How to display all audit log events in one page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

The audit log events under Group admin > Audit log are paginated and hard to parse or extract information from. This article shows a workaround to group all audit log events in a single page.

Thereafter, all audit information can be copied/pasted to Excel or the whole page can exported to PDF. 

Solution

This is more of a workaround that involves an update to the PHP code of the audit log page.

The default maximum number of audit log events per page is hardcoded to 50. You would need to update it to a bigger number inside /hipchat-scm/web/application/models/important_event.php, 1000000 for example: 

sudo dont-blame-hipchat -c 'sed -i "s/const DEFAULT_LIMIT = 50;/const DEFAULT_LIMIT = 1000000;/g" /hipchat-scm/web/application/models/important_event.php'

This change will not persist through upgrades. If you need this change to be permanent:

  1. Create a startup script and name it increase_audit_page_size for example. It's mandatory not to have a file extension (*.sh, *.bash, etc...).
  2.  Include this content in the script: 

     #!/bin/bash
    
    echo "$(date +%Y-%m-%dT%T) Increasing the audit page size to remove pagination"
    sudo dont-blame-hipchat -c 'sed -i "s/const DEFAULT_LIMIT = 50;/const DEFAULT_LIMIT = 1000000;/g" /hipchat-scm/web/application/models/important_event.php'
     

     

  3. Place the script under /home/admin/startup_scripts/ and make it executable:

     chmod +x /home/admin/startup_scripts/increase_audit_page_size
  4. Run the script manually to test. The script will now execute automatically with every reboot or Chef Solo run within Hipchat Server. 

 

Last modified on Jan 19, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.