aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gall <tom.gall@linaro.org>2015-07-31 15:47:52 -0500
committerTom Gall <tom.gall@linaro.org>2015-07-31 15:47:52 -0500
commitd7a5659538118cb4e443805df6c58454ba9a27f2 (patch)
tree6806813e98201eb594be63867afdc1d764804bd0
parent27807b9a9e23c618d22db3faebf92fece74795cc (diff)
Add feature to just walk one epic and it's children with thenew-features
--epic option, must pass parameter in CARD-XXXX format.
-rwxr-xr-xcards2projects.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/cards2projects.py b/cards2projects.py
index ea3f2ab..2e19d42 100755
--- a/cards2projects.py
+++ b/cards2projects.py
@@ -135,6 +135,7 @@ def setup_args_parser():
parser.add_argument("-c", "--component", required=True, help="cards.l.o Component")
parser.add_argument("-p", "--project", required=True, help="projects.l.o Project")
parser.add_argument("--only_epics", action="store_true", help="List only epics, default is epcis and cards")
+ parser.add_argument("-e", "--epic", help="Transfer just this epic and children")
parser.add_argument("--commit", action="store_true", help="Actually do migration and commit results")
return parser.parse_args()
@@ -387,6 +388,9 @@ def constructepicquery(args):
basequery += ' AND summary ~ epic'
basequery += ' AND status != Closed'
+ if args.epic:
+ basequery += ' AND issue = ' + args.epic + ' '
+
basequery += ' AND level not in ("Private - reporter only")'
basequery += ' ORDER BY rank'
return basequery
@@ -490,14 +494,14 @@ def walkcards():
if args.project is None:
raise JiraComponentError('You need to specify a projects.l.o projectt')
- # Initialize dictionaries that will be used to store cards
- basequery = constructepicquery(args)
# debugquery = ""
#
- logger.debug('Get EPICS first with [' + basequery + ']')
+ # logger.debug('Get EPICS first with [' + basequery + ']')
# if debugquery:
# logger.info('WARNING DEBUG ON [' + debugquery + ']')
# issues = jira.search_issues(basequery + debugquery, expand='renderedFields')
+
+ basequery = constructepicquery(args)
issues = jira.search_issues( basequery )
for epic in issues: