When we archive our form, its case should pop back to life. But what about in this situation?

Hello all…

We have a form called A1, and when it is completed, it often creates a
child case called referral.

… Then, we have a form called C1 that is a follow-up form, that opens up
those “referral” cases, and when that C1 form is completed, it closes the
"referral" case.

But also, we have an “automatic case closing rule” that is set to close
"referral" cases that have not been modified in 30 days. (In other words,
if nobody does a “C1” form to close that referral case for 30 days, it will
simply close itself.)

Here is my question, which has to do when we use the *archive *command to
archive a form.

  • Let’s pretend that 6 months ago, someone filled out an A1 form, and it
    created the “referral” child case, and someone did indeed fill out a C1
    form, which nicely closed that “referral” case.
  • Now, it is 6 months later, and we are doing some correcting of data,
    so we archive that C1 form. Of course, the result of archiving that C1
    form is that the case that it had automatically closed should spring back
    alive and be an open case again.
  • BUT, notice that that auto case closing rule for the “referral” case
    type was set to 30 days. Would that case closing rule (or anything else)
    cause this 6-month-ago old case to NOT spring back to life if we go to
    archive the C1 form that had originally closed that case?

Giant thanks for your help, I know this is a tangled question.

Eric

Hi Eric,

You really know how to push the bounds of what you can do with CommCare! :slight_smile:

I'm not sure the exact answer to your question, however an
auto-case-closing rule, behind the scenes, will just submit a "system" form
to close the case. Those "system" forms can be archived just like normal
forms. So I think if the case didn't reopen you could also archive the
"auto-close" form and then it would.

One caveat - it could be possible that once you get in this state the
auto-close rule would keep matching the newly opened case (which might have
an old last modification date) and so those rules might keep closing the
case on you! If this happened I believe you could work around it by just
submitting any update to the case.

Cory

··· On Tue, Nov 28, 2017 at 3:23 AM, Eric Stephan wrote:

Hello all...

We have a form called A1, and when it is completed, it often creates a
child case called referral.

... Then, we have a form called C1 that is a follow-up form, that opens up
those "referral" cases, and when that C1 form is completed, it closes the
"referral" case.

But also, we have an "automatic case closing rule" that is set to close
"referral" cases that have not been modified in 30 days. (In other words,
if nobody does a "C1" form to close that referral case for 30 days, it will
simply close itself.)

Here is my question, which has to do when we use the *archive *command to
archive a form.

  • Let's pretend that 6 months ago, someone filled out an A1 form, and
    it created the "referral" child case, and someone did indeed fill out a C1
    form, which nicely closed that "referral" case.
  • Now, it is 6 months later, and we are doing some correcting of data,
    so we archive that C1 form. Of course, the result of archiving that
    C1 form is that the case that it had automatically closed should spring
    back alive and be an open case again.
  • BUT, notice that that auto case closing rule for the "referral"
    case type was set to 30 days. Would that case closing rule (or anything
    else) cause this 6-month-ago old case to NOT spring back to life if we go
    to archive the C1 form that had originally closed that case?

Giant thanks for your help, I know this is a tangled question.

Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks much to both of you!! I will give it a try –

Eric

··· On Tuesday, November 28, 2017 at 10:23:52 AM UTC+7, Eric Stephan wrote: > > > Hello all... > > We have a form called A1, and when it is completed, it often creates a > child case called referral. > > ... Then, we have a form called C1 that is a follow-up form, that opens up > those "referral" cases, and when that C1 form is completed, it closes the > "referral" case. > > But also, we have an "automatic case closing rule" that is set to close > "referral" cases that have not been modified in 30 days. (In other words, > if nobody does a "C1" form to close that referral case for 30 days, it will > simply close itself.) > > Here is my question, which has to do when we use the *archive *command to > archive a form. > > > - Let's pretend that 6 months ago, someone filled out an A1 form, and > it created the "referral" child case, and someone did indeed fill out a C1 > form, which nicely closed that "referral" case. > - Now, it is 6 months later, and we are doing some correcting of data, > so we *archive* that C1 form. Of course, the result of archiving that > C1 form is that the case that it had automatically closed should spring > back alive and be an open case again. > - BUT, notice that that *auto case closing rule* for the "referral" > case type was set to 30 days. Would that case closing rule (or anything > else) cause this 6-month-ago old case to NOT spring back to life if we go > to archive the C1 form that had originally closed that case? > > > Giant thanks for your help, I know this is a tangled question. > > Eric > > > > > >

The other option for preventing the case close rule from re-closing the
case would be to add another filter to the rule that checks for a case
property with a specific value e.g. auto_close = False.

Obviously a case with that set would never get closed by the auto-close
rule but if you're doing manual cleanup that may be an OK situation.

I think the best course of action is to examine the specific case and see
if the reason it's not showing up is that the auto-case close rule is
re-closing it or if there's something else going on.

Simon Kelly
Director of Server Engineer | Dimagi

··· On 28 November 2017 at 10:45, Cory Zue wrote:

Hi Eric,

You really know how to push the bounds of what you can do with CommCare! :slight_smile:

I'm not sure the exact answer to your question, however an
auto-case-closing rule, behind the scenes, will just submit a "system" form
to close the case. Those "system" forms can be archived just like normal
forms. So I think if the case didn't reopen you could also archive the
"auto-close" form and then it would.

One caveat - it could be possible that once you get in this state the
auto-close rule would keep matching the newly opened case (which might have
an old last modification date) and so those rules might keep closing the
case on you! If this happened I believe you could work around it by just
submitting any update to the case.

Cory

On Tue, Nov 28, 2017 at 3:23 AM, Eric Stephan estephan500@gmail.com wrote:

Hello all...

We have a form called A1, and when it is completed, it often creates a
child case called referral.

... Then, we have a form called C1 that is a follow-up form, that opens
up those "referral" cases, and when that C1 form is completed, it closes
the "referral" case.

But also, we have an "automatic case closing rule" that is set to close
"referral" cases that have not been modified in 30 days. (In other words,
if nobody does a "C1" form to close that referral case for 30 days, it will
simply close itself.)

Here is my question, which has to do when we use the *archive *command
to archive a form.

  • Let's pretend that 6 months ago, someone filled out an A1 form, and
    it created the "referral" child case, and someone did indeed fill out a C1
    form, which nicely closed that "referral" case.
  • Now, it is 6 months later, and we are doing some correcting of
    data, so we archive that C1 form. Of course, the result of
    archiving that C1 form is that the case that it had automatically closed
    should spring back alive and be an open case again.
  • BUT, notice that that auto case closing rule for the "referral"
    case type was set to 30 days. Would that case closing rule (or anything
    else) cause this 6-month-ago old case to NOT spring back to life if we go
    to archive the C1 form that had originally closed that case?

Giant thanks for your help, I know this is a tangled question.

Eric

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.