-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Official stats prototype #2286
Draft
kevincarrogan
wants to merge
101
commits into
dev
Choose a base branch
from
official-stats-prototype
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Official stats prototype #2286
Conversation
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
- remove licence statuses endpoint for now - make tests work
Licence document generation date is taken for this purpose.
When all products on the application are NLR then the current code allowed creation of a licence due a bug. This is not fixed yet so exclude these cases as it can skew licence data.
In some case a licence is issued but subsequently application is marked as withdrawn. Licence also should've been cancelled in this case but we are not handling this atm so filter these cases.
As there can be multiple documents in these cases
Use Case as base object and use it to filter on the licence documents. This avoids filtering of various case statuses, NLR products etc
Use the refusal letter generated date as the decision date
A case can have multiple outcomes and we create instances of this model for each outcome.
These are created for issued, refused and revoked outcomes.
We now have LicenceDecision model so we can generate the extract using those instances instead of deriving from other models.
…n-additional-data
…ional-data LTD-5639: Add additional fields to licence decision
saruniitr
reviewed
Nov 19, 2024
api/data_workspace/v2/serializers.py
Outdated
all_issued = all( | ||
ld.decision == LicenceDecisionType.ISSUED | ||
for ld in licence_decision.case.licence_decisions.all() | ||
if not ld.excluded_from_statistics_reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this are filtered in the view
For those licences that are issued on appeal we want the decision to be updated as 'issued_on_appeal'
If a licence that is issued on appeal needs amending and it is reissued again then the new licence decision is also recorded as issued on appeal (decision remains the same which is issue).
These are renamed as licence_decisions.feature
LTD: Populate issued on appeal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Aim
LTD-