npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sprintly2jira

v1.0.0

Published

Maximally exports Sprint.ly data for a project into a CSV file that can be used to import the data into a JIRA project.

Downloads

2

Readme

sprintly2jira -- A Sprint.ly to JIRA export/import tool.

Maximally exports Sprint.ly data for a project into a CSV file that can be used to import the data into a JIRA project.

Features

The following conversions are handled:

  • JIRA Issue Keys correspond to Sprint.ly item IDs.
  • Sub-tasks
  • Item comments
  • Item attachments
  • Markdown to JIRA syntax
  • Sprint.ly link to JIRA links for the project
  • cross-links to other Sprint.ly projects to related JIRA projects
  • Issue Type conversion
  • Assignee
  • Reporter
  • Tags
  • Status="accepted" adds Resolution=Done in JIRA

Limitations

  • The current design builds the entire export CSV in memory. This has been tested to work without about 5,000 items to export. With a sufficiently large export set, you could run out of memory. Your own your own to update the design in this case.
  • Sprint.ly does not export the comment creation time, so all comments will appear to happen on 2018-07-01 (arbitrarily)

Installing

You can install from npm with:

npm install -g sprintly2jira

Usage

An example use is shown below.

Make sure you address the steps noted in the Preparations section below before running your export.

The result will be a CSV file in the current directory that can be imported into JIRA.

const SprintlyToJira = require('sprintly2jira');

// Example Use.

// map Sprint.ly values on left to JIRA values on Right
const userMap = {
  "[email protected]"              : "username",
};

const projectKey = 'DEMO'

// Map Sprint.ly project numbers on left to JIRA on the right.
// Used for translating Sprint.ly links to JIRA links, even when then cross queues.
// So this mapping should be complete even if you are only importing one queue at a time.
const projectMap = {
  12345  : "DEMO",
};


// Example constructor to migrate a single queue.
const migrator = new SprintlyToJira({

  sprintlyProjectNum: 12345, // DEMO
  // The JIRA project key actively being imported. Must be in projectMap above.
  // Must correspond to sprintlyProjectNum
  jiraProjectKey: 'DEMO',
  jiraBaseUrl: 'https://yourcorpname.atlassian.net',

  // Special proxy temporarily makes Sprint.ly attachments publicly accessible
  // To JIRA during import by authenticating requests during the proxy.
  fileProxyBaseUrl: 'http://sprintlyfiles.yourcorp.com/somesecret',

  // Map Sprint.ly emails to JIRA user names:
  userMap,
  // Map Sprint.ly project names to JIRA project keys
  projectMap,

  // In the JIRA CSV format, we have to have one column per tag, comment, and attachment.
  // We allocate a number of columns for each that is expected to exceed the maximum amount
  // used. We'll throw if this assumption is wrong.
  maxLabels: 20,
  maxComments: 500, // If you have Git integration, every related commit counts as a comment, too!
  maxAttachments: 40,

});

migrator.exportSprintlyToJiraCSV();

Preparing

Authentication

Collect your Sprint.ly email and API Keys and set them in the environment.

   SPRINTLY\_EMAIL
   SPRINTLY\_API\_KEY

Alternately, you can get them in process.env.SPRINTLY_EMAIL and process.env.SPRINTLY_API_KEY in your export script.

Handling Attachments

The JIRA CSV importer allows importing attachments by providing URLs that accessible to JIRA. Sprint.ly's attachments usually require cookie authentication from being logged into the cookie website.

The solution used here is to setup an Nginx proxy at a hidden URL which expects requests to match the same structure as Sprint.ly. The proxy then rewrites the request and redirects the request on to Sprint.ly with authentication.

Sprint.ly in turn will return a public URL to the assest in S3 that expires after 4 hours. This should be enough time to import the CSV file into JIRA.

See ./nginx-sprintly-proxy.conf for an example proxy configuration.

Mapping Sprint.ly users to JIRA users

You need to build a map of Sprint.ly user names to JIRA usernames.

Here's a start, using curl and JQ:

curl  --user "$JIRA_EMAIL:$JIRA_API_KEY"  --header 'Accept: application/json'  --url 'https://rideamigos.atlassian.net/rest/api/2/user/assignable/multiProjectSearch?projectKeys=UFS'   | jq '.[] | {(.emailAddress): .name}'

Formatting Dates

Once you importing your file into JIRA, you'll be asked to provide a date format. The date format to use is:

"yyyy-MM-dd'T'HH:mm:ssX"

Support

Our migration to JIRA is done, so no longer need this tool and won't be maintaining it.

If you'd like to become the new primary maintainer, contact Mark Stosberg [email protected]