Closed val99erie closed 10 years ago
Good catch, @val99erie!
After digging around a little, I don't think this is an issue with rubydora. I think this behavior is coming from fedora itself. (I'm not sure if it is a bug in fedora, or if it's how fedora is intended to work.)
I sent the same POST request to fedora using the RESTClient extension for Firefox, and I get the same result.
This is the URL that I posted (the same URL that rubydora posted): http://localhost:8983/fedora/objects/pid%3A1?state=I&label=blerg
It did successfully create a new object in fedora with pid:1 and label "blerg", but the state was "A" instead of "I".
So, unless there is something wrong with that URL, there is no problem with rubydora that I can see. I'll close out this issue.
Yeah, Fedora "ingest" REST API method doesn't support the "state" param. You have to ingest and then modify.
So, I guess technically it's not a bug, but a feature. :)
On Jun 6, 2014, at 4:59 PM, Valerie Maher notifications@github.com<mailto:notifications@github.com> wrote:
After digging around a little, I don't think this is an issue with rubydora. I think this behavior is coming from fedora itself. (I'm not sure if it is a bug in fedora, or if it's how fedora is intended to work.)
I sent the same POST request to fedora using the RESTClient extension for Firefox, and I get the same result.
This is the URL that I posted (the same URL that rubydora posted): http://localhost:8983/fedora/objects/pid%3A1?state=I&label=blerg
It did successfully create a new object in fedora with pid:1 and label "blerg", but the state was "A" instead of "I".
So, unless there is something wrong with that URL, there is no problem with rubydora that I can see. I'll close out this issue.
— Reply to this email directly or view it on GitHubhttps://github.com/projecthydra/rubydora/issues/79#issuecomment-45383732.
I'm trying to create a new object in fedora that has an object state of "I", but whenever I create a new object, the state always gets stored as "A". (The state is correctly "I" in memory, but if I examine the object in the fedora console or reload the object, the state will be "A".)
If you save the object a second time, it will have the correct state after that. The state just doesn't seem to stick the very first time you save it.
I wrote a failing spec to demonstrate the problem. (You should be able to paste this test into spec/lib/integration_test_spec.rb to get it to work.)