{"action":"created","issue":{"url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1687","repository_url":"https://api.github.com/repos/hydroshare/hydroshare","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1687/labels{/name}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1687/comments","events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1687/events","html_url":"https://github.com/hydroshare/hydroshare/pull/1687","id":193861389,"number":1687,"title":"1657 resource file api","user":{"login":"alvacouch","id":3342292,"avatar_url":"https://avatars2.githubusercontent.com/u/3342292?v=3","gravatar_id":"","url":"https://api.github.com/users/alvacouch","html_url":"https://github.com/alvacouch","followers_url":"https://api.github.com/users/alvacouch/followers","following_url":"https://api.github.com/users/alvacouch/following{/other_user}","gists_url":"https://api.github.com/users/alvacouch/gists{/gist_id}","starred_url":"https://api.github.com/users/alvacouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvacouch/subscriptions","organizations_url":"https://api.github.com/users/alvacouch/orgs","repos_url":"https://api.github.com/users/alvacouch/repos","events_url":"https://api.github.com/users/alvacouch/events{/privacy}","received_events_url":"https://api.github.com/users/alvacouch/received_events","type":"User","site_admin":false},"labels":[{"id":275707500,"url":"https://api.github.com/repos/hydroshare/hydroshare/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"hyi","id":476302,"avatar_url":"https://avatars1.githubusercontent.com/u/476302?v=3","gravatar_id":"","url":"https://api.github.com/users/hyi","html_url":"https://github.com/hyi","followers_url":"https://api.github.com/users/hyi/followers","following_url":"https://api.github.com/users/hyi/following{/other_user}","gists_url":"https://api.github.com/users/hyi/gists{/gist_id}","starred_url":"https://api.github.com/users/hyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyi/subscriptions","organizations_url":"https://api.github.com/users/hyi/orgs","repos_url":"https://api.github.com/users/hyi/repos","events_url":"https://api.github.com/users/hyi/events{/privacy}","received_events_url":"https://api.github.com/users/hyi/received_events","type":"User","site_admin":false},"assignees":[{"login":"hyi","id":476302,"avatar_url":"https://avatars1.githubusercontent.com/u/476302?v=3","gravatar_id":"","url":"https://api.github.com/users/hyi","html_url":"https://github.com/hyi","followers_url":"https://api.github.com/users/hyi/followers","following_url":"https://api.github.com/users/hyi/following{/other_user}","gists_url":"https://api.github.com/users/hyi/gists{/gist_id}","starred_url":"https://api.github.com/users/hyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyi/subscriptions","organizations_url":"https://api.github.com/users/hyi/orgs","repos_url":"https://api.github.com/users/hyi/repos","events_url":"https://api.github.com/users/hyi/events{/privacy}","received_events_url":"https://api.github.com/users/hyi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":41,"created_at":"2016-12-06T19:24:29Z","updated_at":"2017-03-21T14:58:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/1687","html_url":"https://github.com/hydroshare/hydroshare/pull/1687","diff_url":"https://github.com/hydroshare/hydroshare/pull/1687.diff","patch_url":"https://github.com/hydroshare/hydroshare/pull/1687.patch"},"body":"@pkdash @hyi This is submitted for early review. It addresses one small part of issue #1657. It is built on top of PR #1672 so one should review that one first! It affects folders, files, and file management. \r\n\r\nThe dynamics of `FileField` are so complex that we are at present ignoring any builtin `FileField` functions. Our code contains many statements that break that object, including variants of resource_file=\"string\" that -- in effect -- corrupt the file path to the object. Moving forward, it would be nice if we could rely upon `FileField` for file management again. This PR is a first step in that direction. \r\n\r\nThis PR implements a method for normalizing storage paths so that `IrodsStorage` functions remain functional after paths are moved. This has two main parts: \r\n* `ResourceFile.set_storage_path`: Sets a new storage path for a `FileField` bound to `IrodsStorage` or `IrodsStorage(\"federated\")` so that the storage object remains functional. \r\n* `get_path`: a modified target to `FileField.upload_to` that handles whatever FileField hands to it and outputs a normalized path.  \r\n\r\n**The point of this is that if whenever you want to move a file, you use `set_storage_path`, the `IrodsStorage` object will get a meaningful path and can continue to be used.**\r\n\r\nAs well, `ResourceFile.storage_path` will at any time regurgitate an iRODS file path suitable for use with iCommands. Sophisticated error handling rejects erroneous paths. Thus, the `FileField`s provide definitive information on the states of local or federated files, respectively. \r\n \r\n"},"comment":{"url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments/288105571","html_url":"https://github.com/hydroshare/hydroshare/pull/1687#issuecomment-288105571","issue_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/1687","id":288105571,"user":{"login":"alvacouch","id":3342292,"avatar_url":"https://avatars2.githubusercontent.com/u/3342292?v=3","gravatar_id":"","url":"https://api.github.com/users/alvacouch","html_url":"https://github.com/alvacouch","followers_url":"https://api.github.com/users/alvacouch/followers","following_url":"https://api.github.com/users/alvacouch/following{/other_user}","gists_url":"https://api.github.com/users/alvacouch/gists{/gist_id}","starred_url":"https://api.github.com/users/alvacouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvacouch/subscriptions","organizations_url":"https://api.github.com/users/alvacouch/orgs","repos_url":"https://api.github.com/users/alvacouch/repos","events_url":"https://api.github.com/users/alvacouch/events{/privacy}","received_events_url":"https://api.github.com/users/alvacouch/received_events","type":"User","site_admin":false},"created_at":"2017-03-21T14:58:54Z","updated_at":"2017-03-21T14:58:54Z","body":"@hyi @pkdash Pending final checks this is ready for merge. It is unreasonable to think that there will even be a one-day delay when a merge conflict does not emerge with this PR. \r\n\r\nCan we proceed to test it on an instance? \r\n\r\n@mjstealey This needs a test deploy. \r\n"}}
{"actor":{"display_login":"alvacouch"}}