-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Update request base calculated status
- Loading branch information
Showing
5 changed files
with
67 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,10 @@ def transitions(opts = {}) | |
other: {} | ||
} | ||
end | ||
opts.merge!(in_internal_review: state == 'internal_review') | ||
opts.merge!( | ||
Check warning on line 96 in app/models/info_request/state/calculator.rb GitHub Actions / build
|
||
in_internal_review: state == 'internal_review', | ||
internal_review_requested: @info_request.internal_review_requested? | ||
) | ||
build_transitions_hash(opts) | ||
end | ||
|
||
|
@@ -132,7 +135,11 @@ def pending_states(opts) | |
if opts.fetch(:in_internal_review, false) | ||
states = %w[internal_review gone_postal] | ||
else | ||
states = %w[ | ||
states = [] | ||
if opts.fetch(:internal_review_requested, false) | ||
states += ['internal_review'] | ||
end | ||
states += %w[ | ||
waiting_response | ||
waiting_clarification | ||
gone_postal | ||
|
@@ -141,7 +148,7 @@ def pending_states(opts) | |
states += ['internal_review'] | ||
end | ||
end | ||
states | ||
states.uniq | ||
end | ||
|
||
def complete_states(_opts = {}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters