-
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
Surface missingCommissionedLengthReason field #476
base: main
Are you sure you want to change the base?
Conversation
2060a3c
to
5027e1e
Compare
5027e1e
to
4dacd6a
Compare
@@ -311,6 +311,17 @@ const columnDefaults = [{ | |||
isNew: true, | |||
isSortable: true, | |||
sortField: ['statusInPrint'] | |||
},{ |
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.
Re-ordered so the commissionedLength can be next to the webWordCount (and so more easily comparable). But keeping webWordCount and printWordCount next to each other.
This is the inverse order of the Ophan screen (wordCount / commissionedLength), but hard to balance all the needs.
if ($scope.contentItem.missingCommissionedLengthReason !== null && $scope.contentItem.missingCommissionedLengthReason !== undefined) { | ||
updateField("missingCommissionedLengthReason", null); | ||
wfComposerService.deleteField( | ||
$scope.contentItem.composerId, | ||
"missingCommissionedLengthReason" | ||
); | ||
} |
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.
Unset the missingCommissionedLengthReason when a commissioned length is set.
// Don't allow commissioned length to be unset | ||
if(newValue === "") return; |
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.
Happy for others to disagree with this choice. But there doesn't seem to be much benefit in allowing people to remove a commissioned length from a piece that has one set.
Theoretically it would allow users to correct a mistake, but in practice since we expect all (or almost all) pieces to have a commissioned length, it seems more likely that someone might mis-use this feature, i.e. by setting an arbitrary commissioned length on the Workflow form and then removing it to get round the mandate.
template: commissionedLengthTemplate, | ||
active: true, | ||
isSortable: true, | ||
sortField: ['missingCommissionedLengthReason', 'commissionedLength'] |
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.
If you now order the Commissioned Length field by ascending, you should see missingCommissionedLengthReason first. And then very low Commissioned Length values. So will be easier to see mis-use of Commissioned Length.
Would be nice if we could order by descending to see very high Commissioned Length values, but this just shows empty values as highest. Perhaps some refactoring of the sort would help? (Should blank values be included or not in sort is the bigger question).
We recently made commissioned length mandatory in Workflow and gave a way for users to opt out by clicking the Breaking News button.
This PR surfaces this choice in the Workflow UI (in the
Commissioned Length
column, renamed from the vague - if shorter -Commission
).To test
Run locally or deploy to CODE alongside https://github.com/guardian/workflow/pull/1123.