Skip to content

Commit 71c91a9

Browse files
committed
remove draft state check from announcement broadcast policy
fixes CNVS-17975 test plan - create an announcement with a delay post at date - wait for delay post time - ensure that announcement notification is sent Change-Id: Ic6186de76c45622e8af7f33b8059c2262eb03003 Reviewed-on: https://gerrit.instructure.com/47682 Tested-by: Jenkins Reviewed-by: Matthew Wheeler <mwheeler@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com> Product-Review: Joel Hough <joel@instructure.com>
1 parent e13287b commit 71c91a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/announcement.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ def respect_context_lock_rules
6767
whenever { |record|
6868
record.context.available? and
6969
!record.context.concluded? and
70-
((record.just_created and !(record.post_delayed? || record.unpublished?)) || record.changed_state(:active, record.draft_state_enabled? ? :unpublished : :post_delayed))
70+
((record.just_created and !(record.post_delayed? || record.unpublished?)) || record.changed_state(:active, :unpublished) || record.changed_state(:active, :post_delayed))
7171
}
7272

7373
dispatch :announcement_created_by_you
7474
to { user }
7575
whenever { |record|
7676
record.context.available? and
7777
!record.context.concluded? and
78-
((record.just_created and !(record.post_delayed? || record.unpublished?)) || record.changed_state(:active, record.draft_state_enabled? ? :unpublished : :post_delayed))
78+
((record.just_created and !(record.post_delayed? || record.unpublished?)) || record.changed_state(:active, :unpublished) || record.changed_state(:active, :post_delayed))
7979
}
8080
end
8181

0 commit comments

Comments
 (0)