Problem/Motivation

When running the orange-dam:queue-content-by-type command it would be helpful under certain circumstances to sort the result set. This can become very complicated very fast, and the Orange Logic API itself is tricky/hallucinatory when issuing sort flags.

Due to all this complexity, it might be better to initially limit the scope of this request to simply allow for passing a --sort option where the user can pass in an Orange Logic API sort type (sort6, "Oldest first", etc) and leave it at that.

The scenario I am trying to address is where the API limits a result set and I am unable to retrieve all the records. In order to queue a complete set, I would like to be able to queue half the set in one order, and then queue the other half sorted in the opposite order. Doing so should yield the complete set.

I have the changes already and they seem to work. Merge request incoming.

Issue fork orange_dam-3402987

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

apotek created an issue. See original summary.

apotek’s picture

Status: Active » Needs review

adamzimmermann’s picture

Status: Needs review » Reviewed & tested by the community

  • apotek committed f379530d on 1.x
    Issue #3402987: Add ability to sort while queuing
    
apotek’s picture

Extensively tested on three large data sets. I used Orange Logic sort scheme "sort6" and "sort7" to get result lists in ascending and descending order sorted by Title.

Given the pervasive oddness around sorting in Orange Logic's API (problems in documentation as well as implementation) this is about as good as we can support right now.

apotek’s picture

Status: Reviewed & tested by the community » Fixed
markdorison’s picture

Want me to cut a release with this included?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.