{"action":"created","issue":{"url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/issues/302","repository_url":"https://api.github.com/repos/flyve-mdm/glpi-plugin","labels_url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/issues/302/comments","events_url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/issues/302/events","html_url":"https://github.com/flyve-mdm/glpi-plugin/issues/302","id":293954215,"number":302,"title":"Policies we can apply several times for a fleet overwrite each other","user":{"login":"btry","id":14139801,"avatar_url":"https://avatars2.githubusercontent.com/u/14139801?v=4","gravatar_id":"","url":"https://api.github.com/users/btry","html_url":"https://github.com/btry","followers_url":"https://api.github.com/users/btry/followers","following_url":"https://api.github.com/users/btry/following{/other_user}","gists_url":"https://api.github.com/users/btry/gists{/gist_id}","starred_url":"https://api.github.com/users/btry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btry/subscriptions","organizations_url":"https://api.github.com/users/btry/orgs","repos_url":"https://api.github.com/users/btry/repos","events_url":"https://api.github.com/users/btry/events{/privacy}","received_events_url":"https://api.github.com/users/btry/received_events","type":"User","site_admin":false},"labels":[{"id":495592157,"url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/labels/bug","name":"bug","color":"f44336","default":true}],"state":"open","locked":false,"assignee":{"login":"btry","id":14139801,"avatar_url":"https://avatars2.githubusercontent.com/u/14139801?v=4","gravatar_id":"","url":"https://api.github.com/users/btry","html_url":"https://github.com/btry","followers_url":"https://api.github.com/users/btry/followers","following_url":"https://api.github.com/users/btry/following{/other_user}","gists_url":"https://api.github.com/users/btry/gists{/gist_id}","starred_url":"https://api.github.com/users/btry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btry/subscriptions","organizations_url":"https://api.github.com/users/btry/orgs","repos_url":"https://api.github.com/users/btry/repos","events_url":"https://api.github.com/users/btry/events{/privacy}","received_events_url":"https://api.github.com/users/btry/received_events","type":"User","site_admin":false},"assignees":[{"login":"DIOHz0r","id":1426313,"avatar_url":"https://avatars0.githubusercontent.com/u/1426313?v=4","gravatar_id":"","url":"https://api.github.com/users/DIOHz0r","html_url":"https://github.com/DIOHz0r","followers_url":"https://api.github.com/users/DIOHz0r/followers","following_url":"https://api.github.com/users/DIOHz0r/following{/other_user}","gists_url":"https://api.github.com/users/DIOHz0r/gists{/gist_id}","starred_url":"https://api.github.com/users/DIOHz0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DIOHz0r/subscriptions","organizations_url":"https://api.github.com/users/DIOHz0r/orgs","repos_url":"https://api.github.com/users/DIOHz0r/repos","events_url":"https://api.github.com/users/DIOHz0r/events{/privacy}","received_events_url":"https://api.github.com/users/DIOHz0r/received_events","type":"User","site_admin":false},{"login":"btry","id":14139801,"avatar_url":"https://avatars2.githubusercontent.com/u/14139801?v=4","gravatar_id":"","url":"https://api.github.com/users/btry","html_url":"https://github.com/btry","followers_url":"https://api.github.com/users/btry/followers","following_url":"https://api.github.com/users/btry/following{/other_user}","gists_url":"https://api.github.com/users/btry/gists{/gist_id}","starred_url":"https://api.github.com/users/btry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btry/subscriptions","organizations_url":"https://api.github.com/users/btry/orgs","repos_url":"https://api.github.com/users/btry/repos","events_url":"https://api.github.com/users/btry/events{/privacy}","received_events_url":"https://api.github.com/users/btry/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/milestones/3","html_url":"https://github.com/flyve-mdm/glpi-plugin/milestone/3","labels_url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/milestones/3/labels","id":2277428,"number":3,"title":"2.0","description":"","creator":{"login":"btry","id":14139801,"avatar_url":"https://avatars2.githubusercontent.com/u/14139801?v=4","gravatar_id":"","url":"https://api.github.com/users/btry","html_url":"https://github.com/btry","followers_url":"https://api.github.com/users/btry/followers","following_url":"https://api.github.com/users/btry/following{/other_user}","gists_url":"https://api.github.com/users/btry/gists{/gist_id}","starred_url":"https://api.github.com/users/btry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btry/subscriptions","organizations_url":"https://api.github.com/users/btry/orgs","repos_url":"https://api.github.com/users/btry/repos","events_url":"https://api.github.com/users/btry/events{/privacy}","received_events_url":"https://api.github.com/users/btry/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":228,"state":"open","created_at":"2017-01-25T15:12:46Z","updated_at":"2018-02-07T23:20:07Z","due_on":"2018-02-28T08:00:00Z","closed_at":null},"comments":0,"created_at":"2018-02-02T16:54:13Z","updated_at":"2018-02-08T15:12:45Z","closed_at":null,"author_association":"OWNER","body":" \r\n#### Observed Results:\r\n\r\nIf we deploy several apps to a fleet, all MQTT messages will share the same topic. The last app will overwrite all others.\r\n\r\nSame for file deployment, and in general all policies without unicity.\r\n  \r\n#### Expected behavior:\r\nMQTT messages mst be persisted and have a different topic. Let's create a sub level in the MQTT tree for them. \r\n"},"comment":{"url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/issues/comments/364141792","html_url":"https://github.com/flyve-mdm/glpi-plugin/issues/302#issuecomment-364141792","issue_url":"https://api.github.com/repos/flyve-mdm/glpi-plugin/issues/302","id":364141792,"user":{"login":"btry","id":14139801,"avatar_url":"https://avatars2.githubusercontent.com/u/14139801?v=4","gravatar_id":"","url":"https://api.github.com/users/btry","html_url":"https://github.com/btry","followers_url":"https://api.github.com/users/btry/followers","following_url":"https://api.github.com/users/btry/following{/other_user}","gists_url":"https://api.github.com/users/btry/gists{/gist_id}","starred_url":"https://api.github.com/users/btry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btry/subscriptions","organizations_url":"https://api.github.com/users/btry/orgs","repos_url":"https://api.github.com/users/btry/repos","events_url":"https://api.github.com/users/btry/events{/privacy}","received_events_url":"https://api.github.com/users/btry/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T15:12:45Z","updated_at":"2018-02-08T15:12:45Z","author_association":"OWNER","body":"@rafaelje \r\n\r\nHere is my proposal.\r\n\r\nAs far as I understand, your implementation of the agent is not sensitive to the MQTT topic when it receives a policy applied on a fleet.\r\n\r\nWe already agreed to append an ID as a sub topic of the current implementation fro the non unnique policies (app / file deployment and removal).\r\n\r\nWe may go a bit further by defining the ID being the Task ID, and append it for all policies, no matter the unicity of a policy. Doing this would allow us to remove the task ID in the MQTT message (in  the JSON string), while still allowing you to retrieve this ID and use it for feedback (to be implemetned)\r\n\r\nHere is the proposal \r\n\r\n```php\r\n$fleet->notify(\"$topic/Policy/$policyName/Task/$taskId\", $encodedMessage, 0, 1);\r\n```\r\n$topic = the fleet topic\r\n$policy is the symbol of the policy\r\n$tasiId is the ID of the  task, the one you already receive in the JSON\r\n\r\nThis way we also reduce the verall size of a MQTT packet (approximatively 7 bytes)"}}
{"actor":{"display_login":"btry"}}