Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023.9.x feature clone report #1805

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Conversation

EmmyMay
Copy link
Contributor

@EmmyMay EmmyMay commented May 30, 2024

The following changes are implemented

TODO: Summary

Changes in the user interface:

TODO: Add screenshots, recordings or remove this section

Checklist when submitting a final (!draft) PR

  • Commits are tidied up, squashed if needed and follow guidelines in CONTRIBUTING.md
  • Code builds
  • All existing tests pass
  • All new critical code is covered by tests
  • PR is linked to the relevant issue(s)
  • Rebased with the target branch

@EmmyMay EmmyMay self-assigned this May 30, 2024
@EmmyMay EmmyMay requested a review from Fajfa May 30, 2024 10:25
@@ -28,28 +28,26 @@
size="lg"
size-confirm="lg"
variant="danger"
:disabled="deleteDisabled || processingDelete || processing"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to keep the processing otherwise the other buttons are clickable when saving is processing.

size="lg"
variant="light"
:disabled="processing"
:disabled="cloneDisabled || processingClone"
:processing="processingClone"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button variant should match the other clone buttons in the system

@@ -95,14 +97,12 @@ export default {
handleClone (report) {
this.processing = true
this.processingClone = true
const { handle, meta, sources, blocks, scenarios, labels } = report
const clonedReport = this.report.clone()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to clone the report (this causes the list clone to fail)

Just prepare the variables which you get from the report and pass them to the reportCreate

meta.name = `${meta.name} (${this.$t('general:cloneSuffix')})`
const handle = reportHandle ? `${report.handle}_${this.$t('general:cloneSuffix')}` : ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know i said to add the clone to the handle, but it just occurred to me that could raise an error if you clone the same report twice (they'll both have same handle)
So its honestly better to not have a handle at all.

@EmmyMay EmmyMay linked an issue May 31, 2024 that may be closed by this pull request
@EmmyMay EmmyMay force-pushed the 2023.9.x-feature-clone-report branch 4 times, most recently from 9c4fada to 76d2377 Compare May 31, 2024 13:22
@katrinDY
Copy link
Contributor

  • After I clone an old report (created a couple of days ago), it's name doesn't appear in report list in left nav
    1

  • this isn't the best UI imho. Can't we be redirected to the first/last report instead of repot list?
    2

@EmmyMay EmmyMay force-pushed the 2023.9.x-feature-clone-report branch 2 times, most recently from 052d3e3 to 7dedd83 Compare June 5, 2024 12:14
@EmmyMay EmmyMay force-pushed the 2023.9.x-feature-clone-report branch from 7dedd83 to 8a78320 Compare June 13, 2024 09:55
@EmmyMay EmmyMay force-pushed the 2023.9.x-feature-clone-report branch from 8a78320 to 0ac8bde Compare June 13, 2024 09:58
@EmmyMay EmmyMay merged commit 53e0a53 into 2023.9.x Jun 13, 2024
12 checks passed
@EmmyMay EmmyMay deleted the 2023.9.x-feature-clone-report branch June 13, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to Clone/Duplicate a Report
3 participants