{"action":"created","issue":{"url":"https://api.github.com/repos/Islandora/islandora_xml_forms/issues/217","repository_url":"https://api.github.com/repos/Islandora/islandora_xml_forms","labels_url":"https://api.github.com/repos/Islandora/islandora_xml_forms/issues/217/labels{/name}","comments_url":"https://api.github.com/repos/Islandora/islandora_xml_forms/issues/217/comments","events_url":"https://api.github.com/repos/Islandora/islandora_xml_forms/issues/217/events","html_url":"https://github.com/Islandora/islandora_xml_forms/pull/217","id":135783915,"number":217,"title":"Acquire default fields (values) from form definition.","user":{"login":"adam-vessey","id":607975,"avatar_url":"https://avatars.githubusercontent.com/u/607975?v=3","gravatar_id":"","url":"https://api.github.com/users/adam-vessey","html_url":"https://github.com/adam-vessey","followers_url":"https://api.github.com/users/adam-vessey/followers","following_url":"https://api.github.com/users/adam-vessey/following{/other_user}","gists_url":"https://api.github.com/users/adam-vessey/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-vessey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-vessey/subscriptions","organizations_url":"https://api.github.com/users/adam-vessey/orgs","repos_url":"https://api.github.com/users/adam-vessey/repos","events_url":"https://api.github.com/users/adam-vessey/events{/privacy}","received_events_url":"https://api.github.com/users/adam-vessey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-02-23T16:18:33Z","updated_at":"2016-04-22T20:16:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Islandora/islandora_xml_forms/pulls/217","html_url":"https://github.com/Islandora/islandora_xml_forms/pull/217","diff_url":"https://github.com/Islandora/islandora_xml_forms/pull/217.diff","patch_url":"https://github.com/Islandora/islandora_xml_forms/pull/217.patch"},"body":"**Jira:** [ISLANDORA-1559](https://jira.duraspace.org/browse/ISLANDORA-1559) and [ISLANDORA-1595](https://jira.duraspace.org/browse/ISLANDORA-1595)\r\n\r\nSupercedes https://github.com/Islandora/islandora_xml_forms/pull/214\r\n\r\n# What does this Pull Request do?\r\n\r\nStashes and uses the name of the form in which tabs exist in order to create a new tab from the original form definition, instead of attempting to clone a tab from the form structure as-is and tweak it to look like an original.\r\n\r\n# How should this be tested?\r\n\r\n1. Create an XML form containing a tabs/tabpanel structure containing a number of defaulted fields including but not limited to tags.\r\n1. When previewing/using the form, new tabpanels added to a tabs(et) should contain the default values for the contained elements. \r\n\r\nThere _is_ something of a bizarre edge case, where a tabs(et) is defined containing multiple tabpanels: Deleting and adding tabpanels may result in creating the new tabpanel from an unexpected tabpanel.\r\n\r\n# Background context:\r\n\r\nThis is more of a fix for ISLANDORA-1559... ISLANDORA-1595 seemed to try to treat the symptoms.\r\n\r\n# Additional Notes: \r\n* **Does this change require documentation to be updated?** No.\r\n* **Does this change add any new dependencies?** No.\r\n* **Does this change require any other modifications to be made to the repository (ie. Regeneration activity, etc.)?** No.\r\n* **Could this change impact execution of existing code?** Code in the wild which does not specify the form name when instantiating an `XMLForm` will continue to use the \"cloning\" mechanism. We may want to look at deprecating this behaviour at some point? Though, may be useful if we ever want to make tabs work outside of an XMLForm.\r\n\r\n**Tagging:** @DiegoPino (as maintainer)\r\n\r\n----\r\nAdam Vessey\r\n_Developer_\r\n**[discoverygarden inc.](http://www.discoverygarden.ca) | Managing Digital Content**"},"comment":{"url":"https://api.github.com/repos/Islandora/islandora_xml_forms/issues/comments/213575212","html_url":"https://github.com/Islandora/islandora_xml_forms/pull/217#issuecomment-213575212","issue_url":"https://api.github.com/repos/Islandora/islandora_xml_forms/issues/217","id":213575212,"user":{"login":"DiegoPino","id":6946023,"avatar_url":"https://avatars.githubusercontent.com/u/6946023?v=3","gravatar_id":"","url":"https://api.github.com/users/DiegoPino","html_url":"https://github.com/DiegoPino","followers_url":"https://api.github.com/users/DiegoPino/followers","following_url":"https://api.github.com/users/DiegoPino/following{/other_user}","gists_url":"https://api.github.com/users/DiegoPino/gists{/gist_id}","starred_url":"https://api.github.com/users/DiegoPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DiegoPino/subscriptions","organizations_url":"https://api.github.com/users/DiegoPino/orgs","repos_url":"https://api.github.com/users/DiegoPino/repos","events_url":"https://api.github.com/users/DiegoPino/events{/privacy}","received_events_url":"https://api.github.com/users/DiegoPino/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T20:16:48Z","updated_at":"2016-04-22T20:16:48Z","body":"@jordandukart, still same concerns: citing myself, _\"the logic is too resource intensive for something that is supposed to run 'near' realtime, fetching the form from DB again, building it, etc, just to clone a little part, when using a huge form is calling for problems.\"_\r\nThis pull not longer fixes a bug(revert did/should end doing that luckily) , so it's an improvement right? So adding resource/memory/processing intensive to xml forms to preserve defaults for tags is still in my opinion not the best solution.\r\n\r\nThanks!"}}