Skip to content

paulha/OTC_Tools

Repository files navigation

welcome to the JIRA tools scripting sandbox! authors: Paul Hanchett, Josh Wilcox, Robert "BJ" Beatty

  • Now requires Python 3.5 or greater to run

  • Can be installed onto a machine and run as

      python -m jira_tools <command>
    

Available Commands

help

Lists out available commands and switches.

compare_priorities

Scan project sproject platform splatform by GID and look up that GID in tproject for Android version taversion.

  • If priorities mismatch, add Jira ID to the output file.
  • If the taversion does not have a matching item, log the mismatch
  • If priorities match, no output is generated for that entry.

Switches:

Switch Description
sproject Source project
splatform Source platform
tproject Target project
taversion Target Android Version

dump_parents

Scan the open E-Features of splatform and see if Icelake-U SDC is in the platform list. By identifying the parent Feature of the E-Feature.

e_feature_scanner

Scan AREQ for E-Features of sproject / splatform / sversion with a current status of Open, "In Progress", Closed, Merged, or Blocked. Locate the parent feature, and the sibling E-Feature (with the same Feature parent) in splatform / tversion

  • if the verify switch is present, compare the found E-Features, flagging missing E-Features and differences

  • if update switch is present: If the sibling E-Feature with android version tversion is missing, then create create the missing E-Feature with a target version of tversion.

When both verify and update are false, e_feature_scanner will still report when an expected target E-Feature is missing.

Switches:

Switch Description
splatform Source platform (Comparison source)
sversion Source Version
tplatform Target platform (Comparison target)
tversion Target Version
verify Perform verify of found entry
update Create missing E-Features with version tversion

Log Files

There are three cumulative log files generated by jira_tools and placed into the CWD when the command is run. They are

  • otc_tool.log (All output is logged here)
  • otc_tool_errors.log (Only errors are written here)
  • otc_tool.dat (A general purpose data file)

Logging configuration file

The logging configuration file is named logging.yaml and may be in the CWD or in the same directory as otc_tool.py.

Login credentials and server URL

Login credentials are held in config.yaml. Config.yaml may be located in either the CWD or it can be placed into ~/.jira/ located in the user's home directory.

A sample config.yaml.example is provided in the jira_tools subdirectory.

There are multiple sections to this file. If no target server is specified, the default section will be used.

An alternate section can be used by specifying a name switch on the command line:

    python -m jira_tools e_feature_scanner --name <server>

See the example file for more detailed information.

Queries file

The queries file contains templated JQL statements used by the various commands in jira_tools. This provides an easy way to correct a query or perform a custom query without reprogramming the tool. (It isn't intended as a way to signifincantly change functionality: it would be better to add a new command to do that!)

The queries file (queries.yaml) is nominally located in the jira_tools directory. A queriea.yaml file in the CWD will receive preference over the built-in query file.

Example Command Lines

  1. python -m jira_tools help

  2. python -m jira_tools dump_parents -l debug

  3. python -m jira_tools e_feature_scanner -l info --verify --update --splatform "Broxton-P IVI" --sversion O --tversion O-MR1 --createmax 2 --comment "This is a comment added from the command line"

  4. python -m jira_tools copy_platform_to_platform --scenario copy_platform_to_platform -l info

  5. python -m jira_tools copy_platform_to_platform --scenario copy_platform_to_platform_AREQ-25937 -l info

  6. python -m jira_tools add_label_to_platform_version --scenario add_label_to_platform_version -l debug

  7. python -m jira_tools label_from_labeled_items --scenario OPM-128 -l debug

  8. python -m jira_tools project_to_csv --scenario Project-to-CSV -l debug

  9. python -m jira_tools add_label_to_platform_version --scenario add_label_to_platform_version --query_set add_label_to_platform_version_P4 -l info

  10. python -m jira_tools copy_platform_to_platform --scenario copy_platform_to_platform_FIX_GID -l info

  11. python -m jira_tools copy_platform_to_platform --scenario "Copy [O][Icelake-U SDC] to [O][Icelake-U SDC][AaaG]" -l info

About

OTC Tool set

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published