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

Convenience method for working with Portfolio Item states #29

Open
dawsmith8 opened this issue Aug 5, 2013 · 0 comments
Open

Convenience method for working with Portfolio Item states #29

dawsmith8 opened this issue Aug 5, 2013 · 0 comments

Comments

@dawsmith8
Copy link

To set a State this syntax is required:

"State" => "/state/"
It would be convenient if a name can be used instead.

It is possible to query State, create a hash, and populate the hash with the query results, where State Name is the key and State _ref is the value:

state_results.each do |s|
s.read
state_hash[s["Name"]] = s["_ref"]
end
Then we can update a State:

features.each do |f|
field_updates={"State" => state_hash["Developing"]}
f.update(field_updates)
end

A convenience method to make this transparent for the users would be nice.

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

No branches or pull requests

1 participant