~ubuntu-archive/ubuntu-archive-tools/trunk

« back to all changes in this revision

Viewing changes to sru-report

  • Committer: Łukasz 'sil2100' Zemczak
  • Date: 2018-11-22 09:48:02 UTC
  • mfrom: (1191.2.3 sru-report-incomplete)
  • Revision ID: lukasz.zemczak@canonical.com-20181122094802-ti99u83fu753qfy5
If the release/package task is incomplete set the bug's color to yellow (caution)

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
    .noborder { border-style: none; }
186
186
    a { color: blue; }
187
187
    a.messages { color: #999900; font-weight: bold; }
 
188
    a.incomplete { color: yellow; font-weight: bold; }
188
189
    a.verified { color: green; font-weight: bold; }
189
190
    a.verificationfailed { color: red; font-weight: bold; }
190
191
    a.kerneltracking { font-style: italic; }
219
220
 
220
221
<p>Bugs in <span style="color:green;">green</span> are verified,
221
222
bugs in <span style="color:red;">red</span> failed verification,
 
223
bugs in <span style="color:yellow;">yellow</span> are Incomplete,
222
224
bugs in <span style="color: #999900;">golden</span> have received a comment
223
225
since the package was accepted in -proposed,
224
226
bugs in <span style="color: gray;">gray</span> are candidates for removal
330
332
            antique = False
331
333
            for b, t in sorted(rpkg['bugs'].iteritems()):
332
334
                cls = ' class="'
 
335
                incomplete = False
333
336
                try:
334
337
                    bug = lp.bugs[b]
335
338
                    bug_title = bug.title.encode('UTF-8')
336
339
                    hover_text = bug_title
 
340
                    for task in bug.bug_tasks:
 
341
                        if task.self_link.split('/')[4] != 'ubuntu':
 
342
                            continue
 
343
                        if pkg == task.self_link.split('/')[7] \
 
344
                                and release == task.self_link.split('/')[5]:
 
345
                            if task.status == 'Incomplete':
 
346
                                incomplete = True
 
347
                                break
337
348
                except KeyError:
338
349
                    logging.debug(
339
350
                        'bug %d does not exist or is not accessible' % b)
342
353
                if ('kernel-tracking-bug' in t or
343
354
                        'kernel-release-tracking-bug' in t):
344
355
                    cls += 'kerneltracking '
345
 
                if ('verification-failed' in t or
 
356
                if incomplete:
 
357
                    cls += ' incomplete'
 
358
                elif ('verification-failed' in t or
346
359
                        'verification-failed-%s' % release in t):
347
360
                    cls += ' verificationfailed'
348
361
                elif 'verification-done-%s' % release in t: