Skip to content

Commit c47c1a0

Browse files
committed
misc changes I found uncommitted for years - sorry for that
1 parent 8a15883 commit c47c1a0

File tree

3 files changed

+74
-34
lines changed

3 files changed

+74
-34
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ target/
6060

6161
#Ipython Notebook
6262
.ipynb_checkpoints
63+
.gitignore
64+
jiraconfig.py

Diff for: README.org

+14-13
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ corresponding stories are retrieved as well.
3131
python ./jira2org-story.py --help
3232
#+END_SRC
3333

34-
#+RESULTS:
35-
#+BEGIN_quote
34+
#+BEGIN_src
3635
usage: jira2org-story.py [-h] [--version] IPD [IPD ...]
3736

3837
This tool retrieves a Jira issue and returns an Org-mode
@@ -56,7 +55,7 @@ license: GPL v3 or any later version
5655
URL: https://github.com/novoid/jira2org-story.py/
5756
bugreports: via GitHub
5857
version: Time-stamp: <2016-05-13 14:00:47 karl.voit>
59-
#+END_quote
58+
#+END_src
6059

6160
** Motivation and Similar Projects
6261

@@ -75,26 +74,28 @@ synchronize Jira with Org-mode:
7574
** Example
7675

7776
Following headings are an example output when I call my script with
78-
the parameter "1234".
77+
the parameter "1234" (as of 2016-05-14).
7978

8079
Usually, I do use babel to execute the script:
8180

8281
: #+BEGIN_SRC sh :results output raw :dir c:/Users/karl.voit/src/jira2org-story.py/
8382
: c:/Users/karl.voit/src/jira2org-story.py/jira2org-story.py 1234
8483
: #+END_SRC
8584

86-
Please note that I make use of task dependencies using TRIGGER and
87-
BLOCKER properties according to [[http://orgmode.org/worg/org-contrib/org-depend.html][org-depend.el]].
85+
Some remarks:
8886

89-
I did create a customized link so that "IPD:1234" links to its Jira
90-
representative "https://product.infonova.at/jira/browse/IPD-1234".
87+
- Please note that I make use of task dependencies using TRIGGER and
88+
BLOCKER properties according to [[http://orgmode.org/worg/org-contrib/org-depend.html][org-depend.el]].
9189

92-
Usually, I manually do search&replace "i1234" with a human-readable
93-
short version of the story title.
90+
- I did create a customized link so that "IPD:1234" links to its Jira
91+
representative "https://product.infonova.at/jira/browse/IPD-1234".
9492

95-
You might wonder about the status "NEXT". I am using "TODO" to define
96-
a task which will be of interest in future (but not now) and "NEXT"
97-
for a task that can be done *now*.
93+
- Usually, I manually do search&replace "i1234" with a human-readable
94+
short version of the story title.
95+
96+
- You might wonder about the status "NEXT". I am using "TODO" to
97+
define a task which will be of interest in future (but not now) and
98+
"NEXT" for a task that can be done *now*.
9899

99100
This structure is in constant change as I add and remove things or
100101
modify my Org-mode-related workflows.

Diff for: jira2org-story.py

+58-21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python2
22
# -*- coding: utf-8 -*-
3-
PROG_VERSION = u"Time-stamp: <2016-05-13 14:00:47 karl.voit>"
3+
PROG_VERSION = u"Time-stamp: <2017-04-10 17:50:01 karl.voit>"
44

55
import sys
66
import os
@@ -89,7 +89,7 @@ def thing2string(data, addlink=False):
8989
def orglink(text):
9090
"Takes a text like 'IPD-1234' and generates an Org-mode link"
9191

92-
return '[[' + text.replace('IPD-', 'https://product.infonova.at/jira/browse/IPD-') + '][' + text.replace('IPD-', '') + ']]'
92+
return '[[' + text.replace('IPD-', 'https://r6portal-defects.infonova.com/browse/IPD-') + '][' + text.replace('IPD-', '') + ']]'
9393

9494

9595
def get(issues, ipd, query):
@@ -154,7 +154,7 @@ def retrieve_data_from_jira(ipds):
154154
print_line("ERROR: Could not find Python module \"JIRA\".\nPlease install it, e.g., with \"sudo pip install jira\".")
155155
sys.exit(12)
156156

157-
jira = JIRA('https://product.infonova.at/jira/', basic_auth=(jiraconfig.JIRA_USER, jiraconfig.JIRA_PASSWORD))
157+
jira = JIRA('https://r6portal-defects.infonova.com/', basic_auth=(jiraconfig.JIRA_USER, jiraconfig.JIRA_PASSWORD))
158158

159159
query = 'key = "IPD-' + '" or key = "IPD-'.join(ipds) + '" ORDER BY key'
160160
queryissues = jira.search_issues(query)
@@ -198,37 +198,36 @@ def print_issue(issue):
198198
:ID: ''' + orgdate + '''-Story-''' + short)
199199
print_line(u''':END:
200200
201-
| *IPD* | *Confluence* | *Champ* |''')
201+
| *IPD* | *Confluence* | *Champ* |''')
202202

203203
if issue['''assignee''']:
204-
champ = issue['''assignee''']
204+
champ = '@' + issue['''assignee''']
205205
else:
206-
champ = '''-'''
206+
champ = '''@champ'''
207207

208208
print_line(u''' | [[IPD:''' + issue['''key'''] + '''][''' + issue['''key'''] + ''']] | ''' + \
209209
issue['''summary'''] + ''' | ''' + champ + ''' |
210210
211-
*** STARTED create Jira [[IPD:%s]]''' % issue['''key'''])
211+
*** DONE create Jira [[IPD:%s]] :USprep:''' % issue['''key'''])
212212
print_line(u''':PROPERTIES:
213213
:CREATED: [''' + orgtime + ''']
214214
:ID: ''' + orgdate + '''-''' + short + '''-create-jira-ipd
215215
:BLOCKER:
216-
:TRIGGER: ''' + orgdate + '''-''' + short + '''-define-champ(NEXT) ''' + \
217-
orgdate + '''-''' + short + '''-estimation(NEXT)
216+
:TRIGGER:
218217
:END:
219218
220219
- fill out:
221220
- [X] set reporter
222221
- [ ] set level red
223222
- [ ] fixVersion
224223
225-
*** NEXT create Confluence page with template
224+
*** NEXT create Confluence page with template :USprep:
226225
SCHEDULED: <''' + orgdate + '''>
227226
:PROPERTIES:
228227
:CREATED: [''' + orgtime + ''']
229228
:ID: ''' + orgdate + '''-''' + short + '''-create-confluence-page
230229
:BLOCKER:
231-
:TRIGGER: ''' + orgdate + '''-''' + short + '''-write-acceptance-criteria(NEXT)
230+
:TRIGGER: ''' + orgdate + '''-''' + short + '''-write-acceptance-criteria(NEXT) ''' + orgdate + '''-''' + short + '''-DoR(NEXT)
232231
:END:
233232
234233
- fill out:
@@ -238,16 +237,48 @@ def print_issue(issue):
238237
- [ ] Business Value
239238
- [ ] add Confluence-short-URL to story table above
240239
241-
*** TODO write Acceptance Criteria, Docu, Perms
240+
*** NEXT DoR checklist written :USprep:
241+
SCHEDULED: <''' + orgdate + '''>
242+
:PROPERTIES:
243+
:CREATED: [''' + orgtime + ''']
244+
:ID: ''' + orgdate + '''-''' + short + '''-DoR-checklist-written
245+
:BLOCKER:
246+
:TRIGGER:
247+
:END:
248+
249+
*** TODO write Acceptance Criteria :USprep:
242250
:PROPERTIES:
243251
:CREATED: [''' + orgtime + ''']
244252
:ID: ''' + orgdate + '''-''' + short + '''-write-acceptance-criteria
245253
:BLOCKER: ''' + orgdate + '''-''' + short + '''-create-confluence-page
246254
:TRIGGER: ''' + orgdate + '''-''' + short + '''-confidence-green(NEXT) ''' + \
247-
orgdate + '''-''' + short + '''-hand-over-team(NEXT)
255+
orgdate + '''-''' + short + '''-hand-over-team(NEXT) ''' + \
256+
orgdate + '''-''' + short + '''-story-signoff(NEXT)
257+
:END:
258+
259+
*** DoR :@underscore:
260+
:PROPERTIES:
261+
:CREATED: [''' + orgtime + ''']
262+
:ID: ''' + orgdate + '''-''' + short + '''-DoR
263+
:CATEGORY: refinement
264+
:BLOCKER: ''' + orgdate + '''-''' + short + '''-create-confluence-page
265+
:TRIGGER:
266+
:END:
267+
268+
- [ ] Acceptance criteria OK
269+
- [ ] Assumptions & constraints checked
270+
- [ ] External & internal dependencies checked
271+
- [ ] Define impact on testing
272+
- [ ] Impacted Documentation check
273+
274+
*** PM Signoff :USprep:
275+
:PROPERTIES:
276+
:CREATED: [''' + orgtime + ''']
277+
:ID: ''' + orgdate + '''-''' + short + '''-story-signoff
278+
:BLOCKER: ''' + orgdate + '''-''' + short + '''-write-acceptance-criteria
248279
:END:
249280
250-
*** TODO add Champ to Confluence and Jira :refinement:
281+
*** NEXT add Champ to Confluence and Jira :@underscore:''' + champ + '''
251282
:PROPERTIES:
252283
:CATEGORY: refinement
253284
:CREATED: [''' + orgtime + ''']
@@ -256,7 +287,7 @@ def print_issue(issue):
256287
:END:
257288
258289
*** TODO get Estimation on [[IPD:''' + issue['''key'''] + \
259-
''']] :refinement:
290+
''']] :@underscore:
260291
:PROPERTIES:
261292
:CREATED: [''' + orgtime + ''']
262293
:CATEGORY: refinement
@@ -268,7 +299,7 @@ def print_issue(issue):
268299
- Estimation:
269300
270301
*** TODO get confidence-level green on [[IPD:''' + issue['''key'''] + \
271-
''']] :refinement:
302+
''']] :@underscore:
272303
:PROPERTIES:
273304
:CATEGORY: refinement
274305
:CREATED: [''' + orgtime + ''']
@@ -282,20 +313,26 @@ def print_issue(issue):
282313
:PROPERTIES:
283314
:CREATED: [''' + orgtime + ''']
284315
:BLOCKER: ''' + orgdate + '''-''' + short + '''-write-acceptance-criteria ''' + \
285-
orgdate + '''-''' + short + '''-estimation
316+
orgdate + '''-''' + short + '''-estimation ''' + orgdate + '''-''' + short + '''-DoR
286317
:ID: ''' + orgdate + '''-''' + short + '''-hand-over-team
287318
:TRIGGER: ''' + orgdate + '''-''' + short + '''-accept(WAITING) ''' + \
288319
orgdate + '''-Story-''' + short + '''(TEAM)
289320
:END:
290321
291-
*** acceptance + finish US
322+
*** acceptance :@underscore:
292323
:PROPERTIES:
293324
:CREATED: [''' + orgtime + ''']
294325
:ID: ''' + orgdate + '''-''' + short + '''-accept
295326
:BLOCKER: ''' + orgdate + '''-''' + short + '''-hand-over-team
296-
:TRIGGER: ''' + orgdate + '''-Story-''' + short + '''(DONE)
297327
:END:
298-
''')
328+
329+
*** close US
330+
:PROPERTIES:
331+
:CREATED: [''' + orgtime + ''']
332+
:ID: ''' + orgdate + '''-''' + short + '''-close
333+
:BLOCKER: ''' + orgdate + '''-''' + short + '''-accept
334+
:TRIGGER: ''' + orgdate + '''-Story-''' + short + '''(DONE)
335+
:END:''')
299336

300337

301338
def main():

0 commit comments

Comments
 (0)