Skip to content

Allow to select direct children in processes

https://redmine.teklia.com/issues/10734

Requires backend#1924 (closed)

  • The TypeScript types for processes should be redefined with load_children: 'none' | 'direct' | 'all'.

  • In src/components/HeaderActions.vue, the getProcessFilters method needs to be updated to use this new option and make the default filters easier on users:

    • On an element with a non-folder type, load_children is always set to none.

    • On an element with a folder type, load_children is set to direct. If recursive=true was set in the filter bar, load_children is set to all instead.

    • On a corpus, load_children is set to none. We could use the value of the top_level filter, but there are no common use cases that involve starting a process on a corpus, since most processes will be run on files that have been imported into a folder. Having zero elements selected by default will require users to explicitly select what elements they want first.

    • The existing handling for name, type and class_id remains the same.

  • In src/views/Process/Filter.vue:

    • The Load children checkbox is now a <select>, with None, Direct children and All children options.
    • When no elements are found with the selected filters, the warning notification shown by the Paginator should invite users to change their filters. This case can be reached more easily now, since the None option will return zero elements for a process that runs on a corpus.