{"id":22,"date":"2018-09-05T01:58:18","date_gmt":"2018-09-05T01:58:18","guid":{"rendered":"https:\/\/www.aladan.net\/MIMicry\/?p=22"},"modified":"2018-09-05T04:21:50","modified_gmt":"2018-09-05T04:21:50","slug":"skipped-not-precedent-only-cares-about-your-rules-not-your-data","status":"publish","type":"post","link":"https:\/\/www.aladan.net\/MIMicry\/2018\/09\/05\/skipped-not-precedent-only-cares-about-your-rules-not-your-data\/","title":{"rendered":"Skipped-Not-Precedent only cares about your rules, not your data"},"content":{"rendered":"<p>The customer wanted to set AD&#8217;s gidNumber to the last digit of the user&#8217;s objectSid, plus a constant &#8211; but only if there wasn&#8217;t a value present in the field already (so that they could manually set it in AD directly, in certain cases).\u00a0 I figured I&#8217;d be fine with both an import and an export scoped sync rule, since the export rule would only apply when there was no import flow <em>value<\/em> for that attribute.\u00a0 But, it turns out the &#8220;skipped-non-precedent&#8221; check looks at the <em>configuration<\/em>, not the (presence or absence of) actual data!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24\" src=\"https:\/\/www.aladan.net\/MIMicry\/wp-content\/uploads\/2018\/09\/skipped-not-precedent-1.jpg\" alt=\"\" width=\"989\" height=\"28\" srcset=\"https:\/\/www.aladan.net\/MIMicry\/wp-content\/uploads\/2018\/09\/skipped-not-precedent-1.jpg 777w, https:\/\/www.aladan.net\/MIMicry\/wp-content\/uploads\/2018\/09\/skipped-not-precedent-1-300x8.jpg 300w, https:\/\/www.aladan.net\/MIMicry\/wp-content\/uploads\/2018\/09\/skipped-not-precedent-1-768x22.jpg 768w\" sizes=\"auto, (max-width: 989px) 100vw, 989px\" \/><\/p>\n<p>For the solution to this problem please read this blog post: <a href=\"https:\/\/www.aladan.net\/MIMicry\/2018\/09\/05\/design-pattern-conditional-attribute-updates-using-scoped-sync-rules\/\">Conditional Attribute Updates in Scoped Sync Rules<\/a>.<\/p>\n<p>Of course this would be much easier if we just used a Rules Extension EAF, but they&#8217;re deprecated \ud83d\ude41<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The customer wanted to set AD&#8217;s gidNumber to the last digit of the user&#8217;s objectSid, plus a constant &#8211; but only if there wasn&#8217;t a value present in the field already (so that they could manually set it in AD directly, in certain cases).\u00a0 I figured I&#8217;d be fine with both an import and an<span class=\"post-excerpt-end\">&hellip;<\/span><\/p>\n<p class=\"more-link\"><a href=\"https:\/\/www.aladan.net\/MIMicry\/2018\/09\/05\/skipped-not-precedent-only-cares-about-your-rules-not-your-data\/\" class=\"themebutton\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,11,8,7],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-howto","category-learnings","category-mimservice","category-sync"],"_links":{"self":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":4,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/posts\/22\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aladan.net\/MIMicry\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}