[COMPASS-4572] Copy to clipboard button in export to language ignores import for Python Created: 14/Jan/21  Updated: 29/Oct/23  Resolved: 16/Feb/22

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: None
Fix Version/s: 1.31.0

Type: Bug Priority: Minor - P4
Reporter: Massimiliano Marcon Assignee: Le Roux Bodenstein
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Untitled 2021-02-04 12-41-28.png     PNG File Untitled 2021-02-04 12-44-33.png    
Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Versailles

 Description   

Problem Description

When copying Node and Python Code generated in Compass for an aggregation pipeline, and including the driver and library references, it is leaving out those references when copying to the clipboard

Steps to Reproduce

Create an aggregation, export to python, check the box for "Include Import Statements" and for "Include Driver Syntax", observe that from pymongo import MongoClient is added at the beginning of the file.

Click the button and paste into a text editor.

Expected Results

In the text editor I see from pymongo import MongoClient at the beginning of the file.

Actual Results

I don't see from pymongo import MongoClient.

Additional Notes

Reported on Slack.



 Comments   
Comment by Cast Away [ 19/Jan/22 ]

Experienced the same inconvenience.
Version 1.30.1

Generated at Wed Feb 07 22:36:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.