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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jira-requirements-data

v1.2.6

Published

query jira requirements data

Readme

jira-requirements-data

Promise based library to query a JIRA project and return a list of requirements and linked issues with their statuses.

For use in projects where requirements are collected then issues satisfying those requirements are created and linked using JIRA issue linking with a many to many relationship in an analysis phase.

Usage

npm install jira-requirements-data
var jiraRequirementsData = require('jira-requirements-data');

jiraRequirementsData({
  serverRoot: 'https://my.jira.server',
  user: 'myuser',
  pass: 'mypassword',
  maxResults: 50,
  project: 'myproject',
  requirementsRapidView: 123,
  tasksRapidView: 456,
  excludedStates: [
    'parked',
    'rejected'
  ],
  requirements: [{
    name: 'Requirement',
    inwardLinkTypes: [
      'is covered by',
      'is implemented by'
    ],
    states: {
      done: [
        'done'
      ],
      ready: [
        'ready for deployment'
      ]
    }
  }, {
    name: 'Change Request',
    inwardLinkTypes: [
      'is covered by',
      'is implemented by'
    ],
    states: {
      done: [
        'done'
      ],
      ready: [
        'ready for deployment'
      ]
    }
  }, {
    name: 'Risk',
    inwardLinkTypes: [
      'is covered by'
    ],
    states: {
      done: [
        'done'
      ],
      ready: [
        'ready for deployment'
      ]
    }
  }],
  tasks: [{
    name: 'Bug',
    states: {
      done: [
        'resolved',
        'verified',
        'closed'
      ]
    }
  }, {
    name: 'Code Review',
    states: {
      done: [
        'done'
      ]
    }
  }, {
    name: 'Story',
    states: {
      done: [
        'resolved',
        'verified',
        'closed'
      ]
    }
  }, {
    name: 'Task',
    states: {
      done: [
        'done'
      ]
    }
  }]
  onRequirementSprintsTotal: function (total) {
    // start a progress bar or something
  },
  onRequirementSprint: function (sprint) {
    // update a progress bar or something
    // also the requirement sprint data will be provided here
  },
  onTaskSprintsTotal: function (total) {
    // start a progress bar or something
  },
  onTaskSprint: function (sprint) {
    // update a progress bar or something
    // also the task sprint data will be provided here
  },
  onRequirementsTotal: function (total) {
    // start a progress bar or something
  },
  onRequirement: function (requirement) {
    // update a progress bar or something
    // also the requirement data will be provided here
  }
}).then(function (data) {
  console.log(data.requirementSprints);
  console.log(data.taskSprints);
  console.log(data.requirements);
}).done();

The requirementSprints and taskSprints arrays will contain the following structured data

[
  {
    id: 123, // The sprint ID
    sequence: 4561, // The sprint sequence number (for ordering in the rapid view)
    startDate: '13/May/14 5:38 PM', // The sprint start date
    endDate: '27/May/14 5:38 PM', // The sprint end date
    completeDate: '20/Jun/14 5:38 PM', // The sprint complete date (when the sprint was actually closed)
    name: 'My Sprint', // The sprint name
    state: 'CLOSED', // The sprint state, one of ['CLOSED', 'FUTURE', 'ACTIVE']
    issues = [ // Array of issue IDs associated with the sprint
      12345,
      45678,
      ...
    ]
  },
  ...
]

The requirements array will contain the following structured data

[
  {
    id: 12345, // The issue ID
    issuetype: 'Requirement', // The issue type name
    key: 'KEY-123', // The issue key
    summary: 'Implement something', // The issue summary
    state: 'ready', // The issue state, one of ['notready', 'ready', 'done']
    issuelinks: [
      {
        id: 45321, // The linked issue id
        linktype: 'is covered by', // The link type name
        issuetype: 'Story', // The linked issue type name
        key: 'KEY-4535', // The linked issue key
        summary: 'As a user I want to do something so that I can get something', // The linked issue summary
        state: 'done', // The issue state, one of ['notdone', 'done']
      },
      ...
    ]
  },
  ...
]