Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

!close / !clear safety switch #4

Closed
tyrope opened this issue Nov 18, 2015 · 9 comments
Closed

!close / !clear safety switch #4

tyrope opened this issue Nov 18, 2015 · 9 comments
Assignees

Comments

@tyrope
Copy link

tyrope commented Nov 18, 2015

[0009.14Z] <&Ravenov> hmm, i just thought of a feature for mechasqueak[BOT] next time i see DukeOfEarl[Off] 
[0009.40Z] <Tyrope[PC]> Ravenov: Tell me, I'll post it on the bug tracker.
[0009.56Z] <&Ravenov> a !protect option, so that a !clear requires a 2 step so a case doesn't get deleted by mistake

This sounds like it should be default. The new bot already requires the username to be entered (since the IDs from the web API are just stupid) Perhaps it could go something like this:

<Tyrope> !clear testCase
<pipsqueak> To clear "testCase" confirm with code 72478
<Tyrope> !clear testCase 72477
<pipsqueak> Confirmation code incorrect
<Tyrope> !clear testCase 72478
<pipsqueak> Confirmation code correct, case "testCase" closed.

edit: this 5 digit code would of course be randomized per case.

@tyrope
Copy link
Author

tyrope commented Nov 18, 2015

[0014.27Z] <Ravenov> yeah, although for ordinary cases it would add extra clutter
[0015.21Z] <Ravenov> it's more for a case that's going to be active for longer than one dispatcher, so that someone the following day doesn't think it's finishes with
[0016.06Z] <Tyrope[PC]> Ah, gotcha, so you want it to be user-initiated. Makes sense. I'll add this convo as a comment and we'll see what the others say. :)

@duk3luk3
Copy link
Contributor

imo this should be solved simply by cases never being deleted from the Web interface when we have that and the API up and running.

@tyrope
Copy link
Author

tyrope commented Nov 23, 2015

The web API already doesn't support deletions. But upon clearing cases the (sopel) bot removes the case and text lines associated with it from it's memory. As such future command do no longer work on it and vital information is lost.

@duk3luk3
Copy link
Contributor

duk3luk3 commented Dec 6, 2015

Cases should be in one of three categories/states: Open, Inactive, or Closed. I believe it's modelled that way in the Web API already.

Closed cases should be removed from the bot's memory, but there should be a command to list (recent) closed cases and move them to another state.

@tyrope
Copy link
Author

tyrope commented Jan 3, 2016

@duk3luk3 Pardon for not seeing your latest comment earlier. What would this command to list of (recently) closed cases be? (As in, !what)

@trezy Is there a way to search by values 'greater than' when it comes to timestamps?

@tyrope tyrope added this to the Pipsqueak 1.1+ milestone Jan 30, 2016
@dewiniaid
Copy link
Contributor

Some of the work in my work/dragons branch means that -- as a side effect -- we can have multiple 'boards' which may or may not be fully connected to the API.

If we can't search for recently closed cases in the API (and we'd really need a date closed for that to work well), the bot can at least keep a local history of recently closed cases by shoving them off onto a separate board.

As for the command, we already have !list -i for inactive, so why not !list -c for closed?

@Marenthyu
Copy link
Member

since @xlexi is adding the capability to the /rescues endpoint i will make it possible to reopen recently closed rescues. propably !closed to grab closed rescues and !reopen to reopen them.

@Marenthyu Marenthyu self-assigned this Aug 5, 2016
@tyrope
Copy link
Author

tyrope commented Aug 5, 2016

You really don't want to grab all closed rescues, as that will give you literally EVERY case in the past. Limit it by time (The 10 minutes to an hour or so should be fine)

@Marenthyu
Copy link
Member

I wasn't gonna do that. I'll use the limit= parameter to limit it to the 2 latest closed cases. Maybe even add a parameter for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants