Bug
|
Size: 3165
Comment:
|
Size: 4247
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 27: | Line 27: |
| '' add a table of all attributes '' | ||'''Attribute'''||'''Description'''||'''Example'''|| ||.assignee||Person assigned to a bugreport (type: user)|| [#user] || ||.attachments||List of attachments|| [#attachments] || ||.bugnumber||Number of a bugreport (type: int)|| || ||.changed||List of local changes to a bugreport|| [#changed] || ||.comments||List of comments|| [#comments] || ||.date|| || || ||.description|| || || ||.duplicate_of|| || || ||.duplicates||List of duplicates of a bug|| || ||.importance|| || || ||.info|| || || ||.infotable|| || || ||.milestone|| || || ||.nickname|| || || ||.private|| || || ||.reporter|| || || ||.security|| || || ||.sourcepackage|| || || ||.status|| || || ||.subscribtions|| || || ||.summary|| || || ||.tags|| || || ||.target|| || || ||.text|| || || ||.title|| || || ||.url|| || || |
| Line 30: | Line 57: |
| Get a list of attachments: | [[Anchor(attachments)]] Get a list of attachments: |
| Line 59: | Line 87: |
| >>> bug.attachments.remove(bug.attachments.filter(test_filter)) | >>> bug.attachments.remove(test_filter) |
| Line 88: | Line 116: |
| Get a list of comments: | [[Anchor(comments)]] Get a list of comments: |
| Line 102: | Line 130: |
| === User === [[Anchor(user)]] User are String-like objects with an additional attribute `.realname`.[[BR]] {{{#!python >>> str(bug.assignee) 'thekorn' >>> repr(bug.assignee) '<user thekorn (Markus Korn)>' >>> bug.assignee.realname 'Markus Korn' }}} |
|
| Line 106: | Line 146: |
| {{{#!python start=41 | [[Anchor(changed)]] {{{#!python start=41 |
Bug - tutorial
General workflow
That is the way to use python-launchpad-bugs to get information on a bugreport or to edit a bugreport:
It is also possible to get a bugreport by its url:
3 >>> bug = Bug(url="https://bugs.launchpad.net/buglog-data/+bug/120593")
If you want to change the bugreport or view private bugs you have to set Bug.authentication:
4 >>> Bug.authentication="cookie.txt"
Attributes of a bugreport
Overview
Attribute |
Description |
Example |
.assignee |
Person assigned to a bugreport (type: user) |
[#user] |
.attachments |
List of attachments |
[#attachments] |
.bugnumber |
Number of a bugreport (type: int) |
|
.changed |
List of local changes to a bugreport |
[#changed] |
.comments |
List of comments |
[#comments] |
.date |
|
|
.description |
|
|
.duplicate_of |
|
|
.duplicates |
List of duplicates of a bug |
|
.importance |
|
|
.info |
|
|
.infotable |
|
|
.milestone |
|
|
.nickname |
|
|
.private |
|
|
.reporter |
|
|
.security |
|
|
.sourcepackage |
|
|
.status |
|
|
.subscribtions |
|
|
.summary |
|
|
.tags |
|
|
.target |
|
|
.text |
|
|
.title |
|
|
.url |
|
|
Attachments
Anchor(attachments) Get a list of attachments:
As you can see there are four files attached to the bug and the first attachment has already been downloaded.
You can for example filter the list of attachments by the filename:
These filtered attachments can be easily removed:
To add an attachment you have to create an new attachment-object:
Now you have to add this attachment to the bugreport:
Comments
Anchor(comments) Get a list of comments:
Create a new comment and add this comment to the bugreport:
User
Anchor(user) User are String-like objects with an additional attribute .realname.BR
Commit changes
get a list of changes
commit changes
46 >>> bug.commit()
BugHelper/Dev/python-launchpad-bugs/Bug (last edited 2008-08-12 22:24:51 by c-24-21-234-111)