Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on Issue Update #1

Open
leesoh opened this issue Mar 27, 2018 · 4 comments
Open

Clarification on Issue Update #1

leesoh opened this issue Mar 27, 2018 · 4 comments

Comments

@leesoh
Copy link

leesoh commented Mar 27, 2018

Hi there,

First off, thanks for building this! I'm excited to put it to use. I have a quick question regarding the update_issue method. Does it currently only support updating title and description? If it supports updating all fields in an issue, can you provide an example of what that would look like?

@leesoh
Copy link
Author

leesoh commented Mar 27, 2018

Doing something like this seems to work, but it's hacky:

pd.update_issue(project_id, issue_id, 'This is a title', 'Description is here\r\n\r\n#[Header]#\r\nhiiii')

results in:

#[Title]#
This is a title

#[Description]#
Description is here

#[Header]#
hiiii

@pmsosa
Copy link
Contributor

pmsosa commented Mar 27, 2018

Thats initially how it's meant to be used as there are no assumptions as to what fields you are specifying, thus giving you the flexibility to define whatever body you want.

Perhaps we could look into changing the update method such that one doesn't have to take care of the formatting but can simply define a dictionary of fields & their accompanying text.

@leesoh
Copy link
Author

leesoh commented Mar 27, 2018

Yeah, that's what I was thinking as well. Looking at the Dradis API documentation, the issue update method expects a string ('#[Title]#...'), although the get issue's field key contains a dict that would be lovely to just send back modified, but as it is today it looks like it would need to be parsed into a string first.

@leesoh
Copy link
Author

leesoh commented Mar 27, 2018

Took a stab at it here: https://github.com/leesoh/pydradis/blob/dev/pydradis.py#L560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants