{"action":"created","issue":{"url":"https://api.github.com/repos/hydroshare/hydroshare/issues/722","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/722/labels{/name}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/722/comments","events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/722/events","html_url":"https://github.com/hydroshare/hydroshare/pull/722","id":115921583,"number":722,"title":"721 fix for resource title not getting updated","user":{"login":"pkdash","id":2523434,"avatar_url":"https://avatars.githubusercontent.com/u/2523434?v=3","gravatar_id":"","url":"https://api.github.com/users/pkdash","html_url":"https://github.com/pkdash","followers_url":"https://api.github.com/users/pkdash/followers","following_url":"https://api.github.com/users/pkdash/following{/other_user}","gists_url":"https://api.github.com/users/pkdash/gists{/gist_id}","starred_url":"https://api.github.com/users/pkdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkdash/subscriptions","organizations_url":"https://api.github.com/users/pkdash/orgs","repos_url":"https://api.github.com/users/pkdash/repos","events_url":"https://api.github.com/users/pkdash/events{/privacy}","received_events_url":"https://api.github.com/users/pkdash/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hydroshare/hydroshare/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-09T17:08:06Z","updated_at":"2015-11-09T19:51:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/722","html_url":"https://github.com/hydroshare/hydroshare/pull/722","diff_url":"https://github.com/hydroshare/hydroshare/pull/722.diff","patch_url":"https://github.com/hydroshare/hydroshare/pull/722.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments/155171643","html_url":"https://github.com/hydroshare/hydroshare/pull/722#issuecomment-155171643","issue_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/722","id":155171643,"user":{"login":"hyi","id":476302,"avatar_url":"https://avatars.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},"created_at":"2015-11-09T19:51:39Z","updated_at":"2015-11-09T19:51:39Z","body":"@pkdash OK. Got it. I found the place netcdf resource appended 'title' to metadata in its pre_create_resource receiver as shown here: https://github.com/hydroshare/hydroshare/blob/develop/hs_app_netCDF/receivers.py#L58, however, I don't see the extracted title from netcdf resource is added in its pre_add_files_to_resource() receiver, although it may be added later via direct metadata.create_element() call. As you mentioned, it is ideal if this sync of resource title with metadata title can be done in Title create() call (any update() call as well although this sync is done currently in update_metadata_element() view function) in which only single assignment to assign the title to resource.title is needed without additional check and only done when needed. But since there is difficulty in moving it into those create() and update() functions for Title element class, what you did here is a simple way to fix this issue. Another idea I have is to always check resource.metadata.title.value as the title of the resource, perhaps remove title attribute from resource class, so we only have one place for title of the resource without worrying about out-of-sync issues. I am OK to merge this branch in for now if other better solutions involve too much effort at this time."}}