Copy to new graph default name issue
See original GitHub issuePrerequisites
- [X ] Put an X between the brackets on this line if you have done all of the following:
- Running the latest version of Constellation
- Attached the Support Package via
Help
>Support Package
- Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ
- Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues
- Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories
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.
Steps to Reproduce
- Open Constellation
- Open new graph
- 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:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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 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”?
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.