Ticket::Replicator

Ruby Dependabot Updates

Purpose

In order to:

  • Have an overall transparency about all the activities pertaining to a project/product,
  • Track progress
  • Act accordingly

As a stakeholder

I need to replicate defect information from one system to a single reference system.

Installation

  1. Install Ruby.
  2. Install the gem...

    • ... and add to the application's Gemfile by executing:
      bundle add ticket-replicator
    
* ... if bundler is not being used to manage dependencies, by executing:

  ```bash
  gem install ticket-replicator
  ```

Setup

Set environment variables

Define the following environment variables

  • TICKET_REPLICATOR_JIRA_PROJECT_KEY
  • TICKET_REPLICATOR_JIRA_TICKET_TYPE_NAME
  • TICKET_REPLICATOR_SOURCE_TICKET_URL_ERB

For your JIRA access the following variables have to be defined:

Optional environment variables:

  • JIRA_CONTEXT_PATH - Context path for the Jira instance (if needed typically "/jira").
  • JIRA_HTTP_DEBUG - Enable HTTP debug logging (set to "true" or "false").
  • JAT_RATE_INTERVAL_IN_SECONDS - Interval for rate limiting in seconds (e.g., "1").
  • JAT_RATE_LIMIT_PER_INTERVAL - Rate limit per interval for Jira API calls (e.g., "1")
  • TICKET_REPLICATOR_DISABLE_RESOLUTION_LOADING - To deal with tickets not having a resolution field.
  • TICKET_REPLICATOR_ONLY_UPDATE_LINKS_FOR_MODIFIED_TICKETS - Limit the amount of requests to modified tickets only (default to "true" when unset). Set to "false" to disable this feature.

Setup Queue Folder And Field Mapping

  1. Create the queue folder and create an example field mapping configuration file using: bash ticket-replication --setup
  2. Edit the field mapping configuration file to fit your context.

Jira Ticket Type Workflow Expectation - Any to Any

The target issue type in Jira must have a workflow that allows direct transitions between any states. This avoids the need for administrative rights to calculate complex transition paths or discover workflow states through trial and error. Status transitions can be done directly using the transition information available to regular users.

Usage

  1. Move files containing tickets to replicate to the queue/10.extracted folder
  2. Transform and load the tickets (i.e., replicate them) to the Jira project: bash ticket-replicator --ticket-queue-transform-and-load

For more information:

  • Use the built-in help bash ticket-replicator --help
  • Leverage the content of the feature files.

Development

After checking out this repository.

Install Dependencies

bundle install

Continuous Testing While Making Changes

bundle exec guard

Experiment Using An Interactive Prompt

bin/console

Install Locally

To install this gem onto your local machine, run bundle exec rake install.

Release

  1. Bump the gem version: bash bundle exec rake version:bump[{major|minor|patch}]
  2. Release the version to rubygems.org: bash bundle exec rake release which will:
    • create a git tag for the version
    • push git commits and the created tag
    • push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ticket-replicator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Ticket::Replicator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.