Skip to main content

Sort Jira stories in Excel

Project description

⚠️⚠️⚠️ Summary ⚠️⚠️⚠️

⚠️⚠️⚠️ This package was been deprecated. Please use jira-assistant ⚠️⚠️⚠️

Documentation: https://jira-assistant.readthedocs.io/en/stable/

Jira Tool - userful tool to sort jira stories

pypi version python 3.11 python 3.11 (Mac OS) CodeQL Documentation Status

Installation

jira-tool can be installed from PyPI using pip (note that the package name is different from the importable name):

pip install -U sharry-jira-tool

Download

jira-tool is available on PyPI https://pypi.org/project/sharry-jira-tool

Code

The code and issue tracker are hosted on GitHub: https://github.com/jira-assistant/jira-tool

Features

  • Parsing the excel file which usually been downloaded from the Jira platform.

  • Sorting the excel records using some specific logic.

  • Generating the target excel file which contains the result.

  • The excel file structure can be customized by JSON file.

A Simple Example

You can run below command in the PowerShell (Windows OS) or Shell (UNIX OS) to process the excel files.

sort-excel-file source.xlsx

After that, you can find the output file in the same folder along with the source file. For more details, please check the help message like below:

sort-excel-file -h

Currently, we are using the jira access token to do the validation and that means we need you to generate your own access token from the website first.

update-jira-info --token <access_token> --url <jira_url>

If you want to use your own definition files before processing the excel, you can run below command to access some templates which can help you understand the definition file.

generate-template excel-definition

For more details, please check the help message like below:

generate-template -h

Code Example For Developer

Here’s a simple program, just to give you an idea about how to use this package.

import pathlib
from jira_tool import process_excel_file
HERE = pathlib.Path().resolve()
process_excel_file(HERE / "source.xlsx", HERE / "target.xlsx")

If you want to customize the definition file to adapt the new Excel, you can do below steps.

  1. Creating the definition file like below. Inside the PreProcessSteps list, you can determine the procedure which will be triggered before sorting and also inside the SortStrategyPriority list, you can decide the sort algorithms’ order.

[
    {
        "PreProcessSteps": [
            {
                "Name": "FilterOutStoryWithoutId",
                "Enabled": true,
                "Config": {}
            },
            {
                "Name": "RetrieveJiraInformation",
                "Enabled": true,
                "Config": {}
            },
            {
                "Name": "FilterOutStoryBasedOnJiraStatus",
                "Enabled": true,
                "Config": {
                    "JiraStatuses": [
                        "SPRINT COMPLETE",
                        "PENDING RELEASE",
                        "PRODUCTION TESTING",
                        "CLOSED"
                    ]
                }
            }
        ],
        "SortStrategies": [
          {
              "Name": "InlineWeights",
              "Priority": 1,
              "Enabled": true,
              "Config": {}
          },
          {
              "Name": "SortOrder",
              "Priority": 2,
              "Enabled": true,
              "Config": {}
          },
          {
              "Name": "SortOrder",
              "Priority": 3,
              "Enabled": true,
              "Config": {
                  "ParentScopeIndexRange": "12-19"
              }
          },
          {
              "Name": "RaiseRanking",
              "Priority": 4,
              "Enabled": true,
              "Config": {
                  "ParentScopeIndexRange": "12-19"
              }
          }
      ]
    },
    {
        "Columns": [
            {
                "Index": 1,
                "Name": "entryDate",
                "Type": "datetime",
                "RequireSort": false,
                "SortOrder": false,
                "ScopeRequireSort": false,
                "ScopeSortOrder": false,
                "InlineWeights": 0,
                "RaiseRanking": 0,
                "ScopeRaiseRanking": 0
            }
        ]
    }
]
  1. Indicating the definition file location to the process_excel_file method like below.

process_excel_file(
    HERE / "source.xlsx",
    HERE / "target.xlsx",
    excel_definition_file=HERE / "definition_file.json"
)

Meantime, you can follow the same way to customize the milestone priority file.

  1. Configuration file

[
    {
      "Priority": 1,
      "Sprints": ["R134 S1", "M109"]
    }
]
  1. Code example

process_excel_file(
    HERE / "source.xlsx",
    HERE / "target.xlsx",
    sprint_schedule_file=HERE / "milestone_priority.json"
)

Author

The jira-tool module was written by Sharry Xu <sharry.xu@outlook.com> in 2022.

Starting with version 0.1.13, the main function of this project has been totally finished.

Contact

Our mailing list is available at sharry.xu@outlook.com.

License

All contributions after December 1, 2022 released under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sharry_jira_tool-0.2.14.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

sharry_jira_tool-0.2.14-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file sharry_jira_tool-0.2.14.tar.gz.

File metadata

  • Download URL: sharry_jira_tool-0.2.14.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for sharry_jira_tool-0.2.14.tar.gz
Algorithm Hash digest
SHA256 3dd80baea904775dac1f14d12c54dc6be1f62a41abbfdfc76e9f8d65d5882e39
MD5 70e040ef485d2c8879057e1d3a12f245
BLAKE2b-256 994189d2d0474fc7b701f6d46f84c3c68d2cc3c26a25c716915a6058dc62a1ec

See more details on using hashes here.

File details

Details for the file sharry_jira_tool-0.2.14-py3-none-any.whl.

File metadata

File hashes

Hashes for sharry_jira_tool-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 15716817e43f66cb9aabacafb617f5272014c72a8b89a825022d7aa0142611af
MD5 d2739ce357455ce8badca6736f64c2fc
BLAKE2b-256 1f6e054ce38f6cae6d547c55902d07a493abfd750107a58f11431e0a4d19b7a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page