Global Replace: set or replace a field’s value for all caches in the current filter

オープン
#1,092 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
12/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
領域
database, desktop

調査の方向性

Start with docs/architecture/gsak-fields.md to see which fields are planned for writes, then read the Update Location bulk-write code and the opensak.set_corrected macro path that the issue names as the existing write pattern. The open questions (v1 field list, whether imported Groundspeak fields are editable, and undo via #942) need maintainer decisions before any code. Done means those decisions are recorded and a shared write layer is agreed on.

索引モデルが issue の本文から書いたものです。

説明

area: UI improvement

Background

Requested on the GSAK forum (OpenSAK thread) by a user on 1.22.0-beta.4:

How can I edit/update more than one cache in one go. Like the Global Replace in GSAK.

GSAK's Global Replace changes one field on every cache in the current filter in a single operation. The user picks a field, then either sets a fixed value or does a search-and-replace within the field's text. The typical workflow is: build a filter, then run Global Replace on the result. It's widely used for cleanup and for tagging caches before export.

Current state in OpenSAK

There's no general equivalent. Existing bulk operations on the active filter are:

  • User flags: set/clear for filtered caches (#293), clear all flags
  • Delete flagged / filtered caches
  • Move / copy caches to another database
  • Update Location (country/state/county)

The Lua macro system (#938) can iterate over filtered caches. Its write access is still limited to corrected coordinates (opensak.set_corrected). General field writes are in progress, and opensak.set_custom for custom fields is still only planned (docs/architecture/gsak-fields.md).

Proposal

A Global Replace dialog (e.g. under the Waypoints menu) that applies to all caches in the current filter:

  1. Field: a dropdown of user-editable fields. Which fields to include is to be decided; see open questions.
  2. Mode:
    • Replace with: set the field to a fixed value
    • Search and replace: replace text within the field, with an optional regex toggle (reuse the existing regex support)
    • Possibly append/prepend for text fields
  3. Preview / confirmation: show the number of affected caches before applying.
  4. Single transaction, using the same bulk-write pattern as Update Location.
  5. Locked caches: decide whether to skip them or include them.

Ideally the dialog and macro field writes share one write layer, so opensak.* macros and the UI behave the same.

Open questions

  • Which fields? I've asked the forum user which fields they typically use Global Replace on, to drive a v1 field list. Candidates: user note, user flag, found status/date, custom fields (once #1028 lands), name, placed by, country/state/county.
  • Should imported Groundspeak fields be editable at all, given a re-import would overwrite them (unless the cache is locked)?
  • Undo: rely on backup support (#942), or offer a simple "undo last Global Replace"?

Related

  • #293: bulk user-flag actions
  • #938: Lua macro system (general field writes)
  • #1028: Full GSAK Field Compatibility (custom fields)
  • #942: Backup Support
主要言語
Python
スター
37
フォーク
17
平均マージ
21時間 5分
マージ済み PR(30日)
131

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenSAK-Org/OpenSAK のほかの issue

OpenSAK-Org/OpenSAK の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。