App icon indicating copy to clipboard operation
App copied to clipboard

[$500] :pencil2: icon is shown for archived chats - reported by @thesahindia

Open mvtglobally opened this issue 3 years ago • 51 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Create a workspace
  2. Navigate to the announce room for that workspace
  3. Type something in the composer
  4. Delete the workspace

Expected Result:

The draft should get cleared and :pencil2: icon shouldn't be shown

Actual Result:

You will see :pencil2: icon

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.75-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/43995119/173274359-c5355328-7f33-4947-a58e-d8c87cee5a10.mov

Expensify/Expensify Issue URL: Issue reported by: @thesahindia Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1652951524576589 Reported again here: https://expensify.slack.com/archives/C01GTK53T8Q/p1666204335556309

View all open jobs on GitHub

mvtglobally avatar Jun 13 '22 03:06 mvtglobally

Triggered auto assignment to @sonialiap (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

melvin-bot[bot] avatar Jun 13 '22 03:06 melvin-bot[bot]

Good one.

parasharrajat avatar Jun 13 '22 08:06 parasharrajat

Triggered auto assignment to @srikarparsi (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

melvin-bot[bot] avatar Jun 14 '22 15:06 melvin-bot[bot]

changed to weekly, need to use the new API refactoring doc instead of just changing the front end.

srikarparsi avatar Jun 15 '22 16:06 srikarparsi

commented on N7 doc to include this change, on hold until it's finished

srikarparsi avatar Jun 23 '22 21:06 srikarparsi

^^

srikarparsi avatar Jul 04 '22 10:07 srikarparsi

^^

srikarparsi avatar Jul 13 '22 02:07 srikarparsi

^^

srikarparsi avatar Jul 25 '22 14:07 srikarparsi

^

srikarparsi avatar Aug 02 '22 15:08 srikarparsi

^

srikarparsi avatar Aug 16 '22 02:08 srikarparsi

^

srikarparsi avatar Aug 24 '22 18:08 srikarparsi

^

srikarparsi avatar Sep 02 '22 08:09 srikarparsi

^

srikarparsi avatar Sep 15 '22 01:09 srikarparsi

^

srikarparsi avatar Sep 26 '22 04:09 srikarparsi

Issue got fixed with the API refactor, closing it out.

Screen Shot 2022-10-04 at 8 04 17 PM

srikarparsi avatar Oct 05 '22 00:10 srikarparsi

@srikarparsi, it's still reproducible. It was just reported here cc: @adeel0202

thesahindia avatar Oct 19 '22 19:10 thesahindia

interesting, thanks for the heads up, reopening

srikarparsi avatar Oct 19 '22 22:10 srikarparsi

Proposal

  • Reason why the pencil icon doesn't go away because we never add any validation to check if the room is archived or not
  • Based on the status we can show/hide the pencil icon
  • Here we need to add one more validation like below

https://github.com/Expensify/App/blob/0c5642ff79fa174bdefb8033625882be71792596/src/components/LHNOptionsList/OptionRowLHN.js#L197-L201

 {optionItem.hasDraftComment && !optionItem.isArchivedRoom && (
      <View style={styles.ml2}>
          <Icon src={Expensicons.Pencil} height={16} width={16} />
      </View>
 )}

Result Screenshot 2022-10-20 at 10 27 47 AM

Current Code Screenshot 2022-10-20 at 10 29 09 AM

dhairyasenjaliya avatar Oct 20 '22 06:10 dhairyasenjaliya

looks good, marking the issue as external and assigning you to the issue so you can get compensated.

srikarparsi avatar Oct 20 '22 14:10 srikarparsi

Triggered auto assignment to @tjferriss (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] avatar Oct 20 '22 14:10 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (External)

melvin-bot[bot] avatar Oct 20 '22 14:10 melvin-bot[bot]

Current assignee @srikarparsi is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Oct 20 '22 14:10 melvin-bot[bot]

@parasharrajat, @dhairyasenjaliya's solution looks good to me.

srikarparsi avatar Oct 20 '22 14:10 srikarparsi

This ticket was closed because the bug was supposed to be fixed. Yesterday, I encountered this bug and reported it on slack. Its ticket was also created but then it was closed because this one has been reopened. So I think along with @thesahindia, I'm eligible for the reporting bonus too. Thanks. cc: @srikarparsi @tjferriss

adeel0202 avatar Oct 20 '22 14:10 adeel0202

Generally, only one person is eligible for reporting. I am not sure how come two persons can contribute to the same bug report.

parasharrajat avatar Oct 20 '22 16:10 parasharrajat

@parasharrajat had I not reported this bug, this ticket would still have been closed and the bug would still be there. Also, I'm sure you must've seen other similar cases where two persons were credited for the same bug. However, if others think I should not be compensated, I'm fine with it.

adeel0202 avatar Oct 20 '22 16:10 adeel0202

That's why I said Generally. if you are saying that last time this was fixed, then you should be eligible for new reporting only. my 2 :coin:

parasharrajat avatar Oct 20 '22 16:10 parasharrajat

I believe @adeel0202 is eligible for the compensation in this case. Asking internally to get some eyes on it.

thesahindia avatar Oct 20 '22 17:10 thesahindia

Thanks @thesahindia

adeel0202 avatar Oct 20 '22 17:10 adeel0202

I don't like the proposal.

Reason why the pencil icon doesn't go away because we never add any validation to check if the room is archived or not

The reason is simply that no one can add drafts to achieved chats. Adding validations/check for cases that are not possible in the business logic is just not the correct approach.

What will happen to the stored draft of that report?

parasharrajat avatar Oct 20 '22 17:10 parasharrajat