{"action":"created","issue":{"url":"https://api.github.com/repos/liimaorg/liima/issues/12","repository_url":"https://api.github.com/repos/liimaorg/liima","labels_url":"https://api.github.com/repos/liimaorg/liima/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/liimaorg/liima/issues/12/comments","events_url":"https://api.github.com/repos/liimaorg/liima/issues/12/events","html_url":"https://github.com/liimaorg/liima/issues/12","id":194284785,"number":12,"title":"Access parent from resource template","user":{"login":"yvespp","id":15231595,"avatar_url":"https://avatars0.githubusercontent.com/u/15231595?v=4","gravatar_id":"","url":"https://api.github.com/users/yvespp","html_url":"https://github.com/yvespp","followers_url":"https://api.github.com/users/yvespp/followers","following_url":"https://api.github.com/users/yvespp/following{/other_user}","gists_url":"https://api.github.com/users/yvespp/gists{/gist_id}","starred_url":"https://api.github.com/users/yvespp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvespp/subscriptions","organizations_url":"https://api.github.com/users/yvespp/orgs","repos_url":"https://api.github.com/users/yvespp/repos","events_url":"https://api.github.com/users/yvespp/events{/privacy}","received_events_url":"https://api.github.com/users/yvespp/received_events","type":"User","site_admin":false},"labels":[{"id":441249961,"url":"https://api.github.com/repos/liimaorg/liima/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":620859050,"url":"https://api.github.com/repos/liimaorg/liima/labels/owner/mobiliar","name":"owner/mobiliar","color":"e99695","default":false}],"state":"open","locked":false,"assignee":{"login":"phil-pona","id":11518264,"avatar_url":"https://avatars1.githubusercontent.com/u/11518264?v=4","gravatar_id":"","url":"https://api.github.com/users/phil-pona","html_url":"https://github.com/phil-pona","followers_url":"https://api.github.com/users/phil-pona/followers","following_url":"https://api.github.com/users/phil-pona/following{/other_user}","gists_url":"https://api.github.com/users/phil-pona/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-pona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-pona/subscriptions","organizations_url":"https://api.github.com/users/phil-pona/orgs","repos_url":"https://api.github.com/users/phil-pona/repos","events_url":"https://api.github.com/users/phil-pona/events{/privacy}","received_events_url":"https://api.github.com/users/phil-pona/received_events","type":"User","site_admin":false},"assignees":[{"login":"phil-pona","id":11518264,"avatar_url":"https://avatars1.githubusercontent.com/u/11518264?v=4","gravatar_id":"","url":"https://api.github.com/users/phil-pona","html_url":"https://github.com/phil-pona","followers_url":"https://api.github.com/users/phil-pona/followers","following_url":"https://api.github.com/users/phil-pona/following{/other_user}","gists_url":"https://api.github.com/users/phil-pona/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-pona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-pona/subscriptions","organizations_url":"https://api.github.com/users/phil-pona/orgs","repos_url":"https://api.github.com/users/phil-pona/repos","events_url":"https://api.github.com/users/phil-pona/events{/privacy}","received_events_url":"https://api.github.com/users/phil-pona/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/liimaorg/liima/milestones/2","html_url":"https://github.com/liimaorg/liima/milestone/2","labels_url":"https://api.github.com/repos/liimaorg/liima/milestones/2/labels","id":2564757,"number":2,"title":"Version 1.14.0","description":"","creator":{"login":"phil-pona","id":11518264,"avatar_url":"https://avatars1.githubusercontent.com/u/11518264?v=4","gravatar_id":"","url":"https://api.github.com/users/phil-pona","html_url":"https://github.com/phil-pona","followers_url":"https://api.github.com/users/phil-pona/followers","following_url":"https://api.github.com/users/phil-pona/following{/other_user}","gists_url":"https://api.github.com/users/phil-pona/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-pona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-pona/subscriptions","organizations_url":"https://api.github.com/users/phil-pona/orgs","repos_url":"https://api.github.com/users/phil-pona/repos","events_url":"https://api.github.com/users/phil-pona/events{/privacy}","received_events_url":"https://api.github.com/users/phil-pona/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":3,"state":"open","created_at":"2017-06-06T11:53:16Z","updated_at":"2017-09-19T12:12:02Z","due_on":"2017-09-30T07:00:00Z","closed_at":null},"comments":3,"created_at":"2016-12-08T09:23:56Z","updated_at":"2017-09-19T13:40:45Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"In a template defined on a resource or resource type the parent resource (the resource that consumes or provides this resource) should be accessible via hash `parent`.\r\n\r\n- `parent` is set in the same way as `consumer` in resource relation templates. It points to the parent that is currently being generated.\r\n- The `parent` hash should also be available in properties defined on consumed/provided resources and resource relations.\r\n\r\nThis enables us to get rid of resource type relationship templates, as they would have feature parity.\r\n\r\nUsecase: to be able to clone a git repo with a specific version tag I read the version property of the App consuming the GIT resource.\r\nI currently use a workaround for this: `${appServer.my_app.Version}`\r\n`my_app` hast to be changed for each app.\r\n"},"comment":{"url":"https://api.github.com/repos/liimaorg/liima/issues/comments/330542383","html_url":"https://github.com/liimaorg/liima/issues/12#issuecomment-330542383","issue_url":"https://api.github.com/repos/liimaorg/liima/issues/12","id":330542383,"user":{"login":"yvespp","id":15231595,"avatar_url":"https://avatars0.githubusercontent.com/u/15231595?v=4","gravatar_id":"","url":"https://api.github.com/users/yvespp","html_url":"https://github.com/yvespp","followers_url":"https://api.github.com/users/yvespp/followers","following_url":"https://api.github.com/users/yvespp/following{/other_user}","gists_url":"https://api.github.com/users/yvespp/gists{/gist_id}","starred_url":"https://api.github.com/users/yvespp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvespp/subscriptions","organizations_url":"https://api.github.com/users/yvespp/orgs","repos_url":"https://api.github.com/users/yvespp/repos","events_url":"https://api.github.com/users/yvespp/events{/privacy}","received_events_url":"https://api.github.com/users/yvespp/received_events","type":"User","site_admin":false},"created_at":"2017-09-19T13:40:45Z","updated_at":"2017-09-19T13:40:45Z","author_association":"CONTRIBUTOR","body":"For test data we have already an issue: #11 \r\n\r\nI tested the branch and parent works in templates on resources (via parent.name) and resource relations (via consumer.parent.name and provider.parent.name).\r\nHowever in properties of a relation I can't access the parent. I tries parent.name, consumer.parent.name and provider.parent.name. I always get an error that the property is not found: \r\n\r\n```\r\nThe following has evaluated to null or missing: ==> parent\r\n[in template \"_propertyEvaluation_\" at line 1, column 3]\r\n---- Tip: If the failing expression is known to be legally refer to something\r\nthat's sometimes null or missing,\r\neither specify a default value like myOptionalVar!myDefault, or use\r\n<#if myOptionalVar??>when-present<#else>when-missing</#if>.\r\n(These only cover the last step of the expression; to cover the whole expression,\r\nuse parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ----\r\n---- FTL stack trace (\"~\" means nesting-related): - Failed at: ${parent.name}\r\n[in template \"_propertyEvaluation_\" at line 1, column 1] ----\r\n```\r\n\r\nWhat I'm trying to do is to access the app.Version in a related resource property."}}
{"actor":{"display_login":"yvespp"}}