Bug report #15703

Cannot run batch processing with only 1 row of parameters

Added by Keith Jenkins about 8 years ago. Updated about 8 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/GUI
Affected QGIS version:2.16.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23626

Description

When the Batch Processing window first opens, there are three empty rows of parameters. Clicking on the "red minus" icon will remove a row, but it does not work if there are only two rows.

To reproduce the bug:
  • Open the "Merge vector layers" tool
  • Click the "Run as batch process..." button
  • Try to delete the rows so that only one is left (nothing happens once you are down to 2 rows)

Why would we need to use batch processing for a single operation?

Great question! Here's one example: Now that ftools has been removed, the recommended way of merging a whole directory of shapefiles is to use the batch processing interface, as recommended in #15321 However, if you only need to merge a single directory, there is no way to remove the extra row in the batch interface, and clicking "Run" results in an error: "Missing parameter value: Layers to merge (row 2)"

Fixing this requires just a very trivial change of a single character in this line:
https://github.com/qgis/QGIS/blob/66035b616145351619e96c42fc7c172668d375de/python/plugins/processing/gui/BatchPanel.py#L269

Associated revisions

Revision 05e70b26
Added by Victor Olaya about 8 years ago

[processing] allow only one row in batch interface

fixes #15703

History

#1 Updated by Victor Olaya about 8 years ago

It shouldnt make sense to run a single line. If there is something you want to do with a single line, you can do it with the normal interface

In the case you mention, is true that you cannot do that from the normal dialog, since for multiple inputs, you must select them from open file. That should be corrected there, we should make that input more flexible.

However, that is a bigger change, so i will allow running a single algorithm from batch processing, since the change you propose is harmless

Thanks for the proposal!

#2 Updated by Victor Olaya about 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF