briefcase icon indicating copy to clipboard operation
briefcase copied to clipboard

Regression - The user sees the status and active details button only for newest pulled/pushes forms

Open mmarciniak90 opened this issue 6 years ago • 17 comments

Software versions

Briefcase master - REGRESSION Java v1.8 Operating system: Ubuntu, macOS, Windows

Problem description

The user sees the status and active details button only for newest pulled/pushes forms

Steps to reproduce the problem

  1. The user selects few forms and pulls/pushes
  2. The user selects other forms and pulls/pushes
  3. The user sees status and details button only for forms from the second pull/push
1.10.1 master first pull master second pull
1 1a 1b

Expected behavior

The user should see the status and active details button for all pulled/pushed/exported forms

mmarciniak90 avatar Jun 06 '18 13:06 mmarciniak90

Thanks, @mmarciniak90! I think this one requires a little bit of discussion. I'm tagging @yanokwa and @dcbriccetti.

Now the detail window of all forms gets cleaned every time you start a new operation. Before that, you couldn't know which form you pulled/pushed last and lines from previous operations on the same form were present too.

This was made some versions ago and we can bring back the old behavior if we want. No problem :)

ggalmazor avatar Jun 06 '18 18:06 ggalmazor

I think it's OK that the status gets reset on each operation, but it's not great that you can't click through to see the old messages.

Dunno how reasonable this is, but is it easy to leave the log button enabled and then only update the status of the most recent?

That said, I don't feel strongly about any of this...

yanokwa avatar Jun 06 '18 18:06 yanokwa

Dunno how reasonable this is, but is it easy to leave the log button enabled and then only update the status of the most recent?

Is that:

  • Clean all rows of the "Push Status" column
  • Leave the detail button enabled with any content it had before

?

ggalmazor avatar Jun 06 '18 19:06 ggalmazor

I mean, clean all rows before a new push status. And yes, leave the detail enabled with any content it had before.

yanokwa avatar Jun 11 '18 23:06 yanokwa

A simple (and probably superficial) solution might be to delete line statusHistory.setLength(0) from method clearStatusHistory() in class org.opendatakit.briefcasel.model.FormStatus.java. This will clear "success" after each pull/push while leaving detailed status intact for all pulls/pushes. Screen Shot 2019-03-24 at 1 59 46 PM

hc02ca avatar Mar 24 '19 18:03 hc02ca

Hi, @hc02ca, thanks for joining the conversation!

I think you're right, but we should also make sure the UI cleans all those table cells once the user clicks on Pull.

We could even mark the start of a new pull with a new message in the status history to help reading the details.

ggalmazor avatar Mar 25 '19 09:03 ggalmazor

In pull status, how about “Retrieving…” as it retrieves and then either “Success” or “Failed” when it’s finished.

In the corresponding Status History, how about “Forms are ready for use” if it’s a success.

In the corresponding Status History, how about “Forms were not retrieved. “ if it failed along with more details.

Possible reasons it failed: (Maybe)

  1. Server connection was lost translated to “Server connection was lost. Try pulling forms again”

  2. Internet connection was unstable translated to “Check your internet connection. Try pulling forms again.”

  3. Packets were lost on internet translated to “Forms may have been large. Try pulling forms again.”

  4. Permission was denied by server translated to “Server denied connection. Check to see if url, user login and password were correct”

  5. Error XYZ happened translated to “Error XYZ occurred. Contact support with log for help.”

etc…

As a non-technical user, I would not want to see a a long message if it failed. I would not be interested in knowing if chunk 1 was processed correctly.

Screen Shot 2019-04-11 at 12 59 05 PM

If the log status icon stays bold when there is detailed status in it, it would not be necessary to state which pull was the newest, as only the new pull will finish with either “Success” or “Failed” In the Pull Status column.

hc02ca avatar Apr 11 '19 17:04 hc02ca

Thanks, @hc02ca! All the information we're gathering in this issue is super valuable.

We've been working on improving the way Briefcase gives user feedback and handles log messages, and the things you're pointing out are clearly something we need to take care of. For example, all the details from your last screenshot should go into the log file instead of that dialog.

At this moment we're able to make small improvements but actually fixing this across the board will take some time.

In any case, we're working on improving the way Briefcase pulls and pushes forms, and we will take the change to tweak the messages on the details dialog

ggalmazor avatar Apr 12 '19 09:04 ggalmazor

IntelliJ no longer runs briefcase. It's able to run Validate though. Any ideas?

Screen Shot 2019-05-16 at 7 01 26 PM Screen Shot 2019-05-16 at 7 02 07 PM

hc02ca avatar May 16 '19 23:05 hc02ca

There has to be something wrong with your particular IntelliJ project setup. I use it every day and I can launch Briefcase with no problem.

Maybe try with the File > Invalidate cache / Restart option

ggalmazor avatar May 17 '19 06:05 ggalmazor

When you mean clear the UI did you mean to call refresh() on it? Like the below code:

In PullPanel.java class:

view.onAction(() -> { view.setWorking(); view.refresh(); //redraw table forms.forEach(FormStatus::clearStatusHistory); // delete line statusHistory.setLength(0) in method

// pulling action starts below

new Thread(() -> source.ifPresent(s -> pullJobRunner = s.pull(
      forms.getSelectedForms(),
      appPreferences.getBriefcaseDir().orElseThrow(BriefcaseException::new),
      appPreferences.getPullInParallel().orElse(false),
      false,
      appPreferences.getResumeLastPull().orElse(false),
      Optional.empty()
  ))).start();
});

hc02ca avatar May 27 '19 18:05 hc02ca

I'm sorry, @hc02ca... I think I need more context to understand what you're asking. Can you point me to the line where I'm using "clear the UI"

ggalmazor avatar Jun 03 '19 09:06 ggalmazor

@ggalmazor

When you said "make sure the UI cleans all those table cells once the user clicks on Pull." did you mean clean all cells under

  • pull status column (3rd column)

  • detailed status column (4th column)

before a pull?

Or did you mean clean all cells under ALL four columns before a pull?

hc02ca avatar Jan 31 '20 01:01 hc02ca

Hi @ggalmazor. Can you provide clarification to above question. Thanks!

hc02ca avatar Feb 27 '20 23:02 hc02ca

Hi, @hc02ca! Sorry for the delay of my answer. I haven't had the chance to deal with Briefcase lately.

When you said "make sure the UI cleans all those table cells once the user clicks on Pull." did you mean clean all cells under

  • pull status column (3rd column)
  • detailed status column (4th column)

Yes, I think that's what we're proposing as a fix.

ggalmazor avatar Mar 02 '20 16:03 ggalmazor

This is from class org.opendatakit.briefcase.model.FormStatus.java If the form is not selected and there is detailed status info, clear only status (3rd column) for that entry. Otherwise, for all other options, clear 3rd and 4th column.

public synchronized void clearStatusHistory() {
  if ( isSelected != true && statusHistory.length() != 0){
    statusString = "";
  } else {
    statusString = "";
    statusHistory.setLength(0);
  }
}

The first pull is for Farmer Registration_NEW form.

Pic1

The second pull is for Pear form, however, Farmer Registration form's detailed status button is still bold because it still holds the logged entry from the first pull. Pic2

This work the same way for pushing forms as org.opendatakit.briefcase.ui.push.PushPanel.java also accesses org.opendatakit.briefcase.model.FormStatus.java

What do you think @ggalmazor ?

hc02ca avatar Mar 05 '20 15:03 hc02ca

This is looking good to me, @hc02ca :) Let's tag @yanokwa in case he has some feedback to give about it.

I'd suggest some minor changes to the example code you've posted, tough

public synchronized void clearStatusHistory() {
  statusString = "";
  if (isSelected || statusHistory.length() == 0)
    statusHistory.setLength(0);
}

ggalmazor avatar Mar 09 '20 15:03 ggalmazor