Giter Site home page Giter Site logo

jirascripts's Introduction

JiraScripts

Repository contains ocripts for Jira writing in groovy language. Tested with Jira versions 7.x, scripts were ran with Adaptavist ScriptRunner add-on. Might be run as validators/postfunctions/etc.

Scripts description

DeleteAllIssues

Script does exactly what it name says - delete all issues in Jira.

For succeful execution you must run this one with user that have delete issue permission in all projects. The easiest way to do this is to change Permission schemes to allow runuser Delete issue check in Atlassian documentation

By default script doesn't run in debug mode, to run it in debug please set "debug" flag to true in 'main' method. In debug mode script writes to a standard log file (%JIR_HOME/logs/catalina.out in Linux OS):

  • in case of successful deleting: "issue %ISSUE-ID has been deleted"
  • in case of failure: "There is an error while deleting %ISSUE-ID - User must have Delete issue permission in project!"

Be aware! Log is created for every issue - on a really large instance might be root cause of freezing!

DeleteProjectIssues

Almost the same as DeleteAllIssues

Script does exactly what it name says - delete issues for given project in Jira. For succeful execution you must run this one with user that have delete issue permission in all projects. The easiest way to do this is to change Permission schemes to allow runuser Delete issue check in Atlassian documentation

By default script doesn't run in debug mode, to run it in debug please set "debug" flag to true in 'main' method. In debug mode script writes to a standard log file (%JIR_HOME/logs/catalina.out in Linux OS):

  • in case of successful deleting: "issue %ISSUE-ID has been deleted"
  • in case of failure: "There is an error while deleting %ISSUE-ID - User must have Delete issue permission in project!"

Be aware! Log entry is created for every issue - on a really large instance might be root cause of freezing! getHeap A small script that allows you to get useful information about heap current usage. Usecases:

  1. Set up a scheduled tasks and add notification about high usage via mail or get ticket automatically created in queue which responsible for Jira instance.
  2. Set up a custom REST Endpoint and return only usage. Here you go with monitoring system - just fetch data from URL with Nagios/Zabbix/Crontab/etc and set yours tresholds. Please note that for DataCenter edition you should set different endpoints - I did not test it but should works. Bonus - you don't need JDK for this! getClusterManager Returns ClusterManager instance. Atlassian Docs Allows us to fetch info about each nodes in cluster.

jirascripts's People

Contributors

punkoivan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.