question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Copy to new graph default name issue

See original GitHub issue

Prerequisites

Description

Creating a new graph, and selecting “Copy to New Graph” will create a new graph successfully, but rename the graph as the next graph number appended. This does not appear to be intuitive that it is a copy. image

Steps to Reproduce

  1. Open Constellation
  2. Open new graph
  3. Copy to new graph

Expected behaviour: New graph is opened and named incrementally. analyticgraph1 is copied to new graph named analyticgraph2

Actual behaviour: New graph is opened and new graph number is appended. analyticgraph1 is copied to new graph named analyticgraph12

Reproduces how often: 100%

Additional Information

N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
arcturus2commented, Jan 14, 2020

@aldebaran30701 I’ve had a chat to @cygnus-x-1 about this and I’ve had a re-think about this. I guess that just because no one has complained it doesn’t mean there isn’t anything wrong.

@cygnus-x-1 suggested maybe having a - before appending the increment number should be a little bit clearer than analyticgraph1234 perhaps.

I don’t agree with the idea of having special logic to inspect the graph name and if it happens to have a number then increment it in the copied graph.

I take this back. If you want to pursue this or another idea then go for it and I’ll be happy to see what you come up with. I think at the time this was implemented, it was determined too much of a hassle to keep track of the number of graphs open and append the right number and a simple incrementing counter was “sufficient”.

If you do decide to append " - copy" then to solve the problem of preventing long graph names like “analyticgraph - copy - copy” can the same thinking of incrementing a number be used so it will be something like “analyticgraph - copy”, “analyticgraph - copy 2”, “analyticgraph - copy 3”?

1reaction
GCHQDeveloper601commented, Aug 14, 2020

Looking at picking this ticket up, looks like the logic here gets a little tricky as it’s used for both brand new graphs and the copy method and there is no way to differentiate between the copy vs a new graph. The name passed in is simply a “type” and the counter increments regardless if a number is used at all. Would removing the number be acceptable if there isn’t currently a graph with the same name?

i.e. first graph = analyticgraph second graph = analyticgraph1 yet another new graph = analyticgraph(++i) copy from first graph = analyticgraph - copy copy from copy = analyticgraph - copy 1 copy form second copy = analyticgraph - copy 2

Does this sound like a sound way forward? In order to make this work it may need another method with a property if it’s a copy or a way to look through the other names and see if there is already a file with the name of what is trying to be created.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known issues with Microsoft Graph
This article describes known issues and limitations with Microsoft Graph and provides workarounds when possible.
Read more >
The unnamed/default graph should have a standard name
At present the unnamed/default graph has no standard name. This means that, when writing code that manipulates graphs, one must special-case the ...
Read more >
python - Copy one graph to another
Thanks to the answer here, I was able to solve the issue using export_meta_graph and import_scoped_meta_graph .
Read more >
SPARQL 1.1 Update
Copy, move, or add the content of one RDF graph in the Graph Store to another. ... Graph Store MAY use different names...
Read more >
How to Quickly Copy Chart (Graph) Format in Excel - Video
Now when you insert a new chart in Excel, it comes loaded with all the default formatting (chart on the right). Excel Copy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found