This repository has been archived by the owner on Dec 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jvlcek
changed the title
This pull request adds support to simplify the hanlding of keywords while also allowing for the use of all of the keyword subcammands supported by the xmlrpc API. Although the underlying XMLRPC support for keywords subcommands is murky, allowin the user access to it will be provided. By default the user does not have to be concerned that the XMPRPC interface for modifying keywords requries a subcommand. By default the user can provide an array of keywords, to match what is returned from a query for keywords. e.g.: require "active_bugzilla" service = ActiveBugzilla::Service.new("https://partner-bugzilla.redhat.com", "cfme-bot@redhat.com", "*********") ActiveBugzilla::Base.service = service bug = ActiveBugzilla::Bug.find(:id => [965147]).last puts "#{bug.keywords}" => ["UseCase", "UserExperience", "ZStream"] bug.keywords.delete("UseCase") bug.keywords << "Upstream" bug.update_attributes(:keywords => bug.keywords) Although the underlying XMLRPC support for keyword subcommands is murky, allowin the user ac
Simplify keywords API
Apr 30, 2014
@chessbyte, @abellotti |
public_send("#{name}=", value) | ||
if symbolized_name == :flags | ||
attributes[name] = flags_raw_updates | ||
else | ||
attributes[name] = keywords_value(value) if symbolized_name == :keywords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jvlcek I do not understand why we are calling this twice in one method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chessbyte Me either. ;)
@chessbyte I do not understand why I'm calling it twice in one method either. |
Checked commits jvlcek@eb76866 .. jvlcek@91abd8a with rubocop 0.21.0 |
@chessbyte Are you OK with this being merged? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support to simplify the handling of keywords while
also allowing for the use of all of the keyword sub-commands supported by the
xmlrpc API. Although the underlying XMLRPC support for keywords sub-commands
is murky.
By default the user does not have to be concerned that the XMPRPC interface for
modifying keywords requires a sub-command. By default the user can provide an
array of keywords, to match what is returned from a query for keywords.
e.g.:
require "active_bugzilla"
service = ActiveBugzilla::Service.new("https://partner-bugzilla.redhat.com", "cfme-bot@redhat.com", "*********")
ActiveBugzilla::Base.service = service
bug = ActiveBugzilla::Bug.find(:id => [965147]).last
puts "#{bug.keywords}"
=> ["UseCase", "UserExperience", "ZStream"]
bug.keywords.delete("UseCase")
bug.keywords << "Upstream"
bug.update_attributes(:keywords => bug.keywords)
Although the underlying XMLRPC support for keyword sub-commands is murky,
access to it is provided.
e.g.:
bug.update_attributes(:keywords => {"keywords_add" => ["UseCase"]})