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

Prevent imported feature files from changing existing issue data #100

Closed
csvtuda opened this issue Jul 4, 2023 · 15 comments
Closed

Prevent imported feature files from changing existing issue data #100

csvtuda opened this issue Jul 4, 2023 · 15 comments
Assignees
Labels
feature New feature or request

Comments

@csvtuda
Copy link
Contributor

csvtuda commented Jul 4, 2023

When importing feature files during feature file synchronization, any existing issue information is replaced with the imported feature file's data (summaries, steps, tags, ...). Having an option at hand for disabling this behaviour would be useful.

The jira ticket title is altered too, although I just wanted to upload the Feature with the background steps together. So either I dont upload anything or my tickets are altered completely (title, tags, cucumber steps), but I wished only the steps to be uploaded or altered.

Originally posted by @alexviz7 in #86 (comment)

@csvtuda csvtuda added feature New feature or request under investigation The issue is being investigated labels Jul 4, 2023
@csvtuda csvtuda self-assigned this Jul 4, 2023
@csvtuda
Copy link
Contributor Author

csvtuda commented Jul 4, 2023

Related to #83.

@csvtuda csvtuda added 🏗 in progress The issue is being worked on and removed under investigation The issue is being investigated labels Jul 27, 2023
@csvtuda
Copy link
Contributor Author

csvtuda commented Jul 31, 2023

Hey @alexviz7, I just released version 4.0.0, which now automatically backups the issues' summaries. Should the imported feature file change them, they will be reset afterwards. Can you check if this works for you? If it does, I will add more backup options (description, labels).

@csvtuda csvtuda added awaiting feedback The issue has been addressed and the reporter's feedback is requested and removed 🏗 in progress The issue is being worked on labels Jul 31, 2023
@alexviz7
Copy link

The title isn't changed, but labels are still altered with option uploadFeatures: true, and uploadResults: true.
Screenshot 2023-07-31 162336

@csvtuda
Copy link
Contributor Author

csvtuda commented Jul 31, 2023

Ok thank you for confirming, I will add label backups and description backups then in the next few days.
I mostly only have access to a cloud instance and was unsure if this approach of reverting import changes works for server instances too. I will ping you again once it's done.

@alexviz7
Copy link

Also test execution files now have as an assignee the standard assignee of the project, which is the product owner, but not the one with the Jira PAT, which is me. This was not the case with the previous version.

@csvtuda
Copy link
Contributor Author

csvtuda commented Jul 31, 2023

Just to clarify: does this apply to:

  • existing test execution issues which are modified by the plugin
  • new test execution issues created by the plugin
  • both?

I should probably add an option to assign created test execution issues to specific users.

@alexviz7
Copy link

Creating any jira ticket manually will have the assignee input field filled with the name of the product owner, so Its not an issue perse. However with the previous plugin versions the ticket created by the plugin had my name as an assignee as it was my PAT that was used.

@alexviz7
Copy link

alexviz7 commented Aug 1, 2023

issue with labels and assignee is still reproducible with the version 4.0.1

@csvtuda csvtuda added 🏗 in progress The issue is being worked on and removed awaiting feedback The issue has been addressed and the reporter's feedback is requested labels Aug 1, 2023
@alexviz7
Copy link

alexviz7 commented Aug 2, 2023

Creating any jira ticket manually will have the assignee input field filled with the name of the product owner, so Its not an issue perse. However with the previous plugin versions the ticket created by the plugin had my name as an assignee as it was my PAT that was used.

I think it is a minor issue since I will use fixed test execution files instead of generating new ones each time.

@alexviz7
Copy link

alexviz7 commented Aug 21, 2023

@csvtuda
Hi how is the progress going?

@csvtuda
Copy link
Contributor Author

csvtuda commented Aug 22, 2023

I'm working on it, but life has been busy. It's taking a little bit longer because I need to introduce new options, and I'm careful around new options to prevent a series of breaking bug fix changes.

@csvtuda
Copy link
Contributor Author

csvtuda commented Aug 23, 2023

Hey @alexviz7,

Version 4.0.2 is now released and should include a fix which resets the labels to their original set after a successful feature file import.

The new version does not include any updates to your assignee problem, though.

Can you confirm if the label reset works?

@csvtuda csvtuda added awaiting feedback The issue has been addressed and the reporter's feedback is requested and removed 🏗 in progress The issue is being worked on labels Aug 23, 2023
@alexviz7
Copy link

alexviz7 commented Aug 24, 2023

Hi i ve just tried it. Without the JIRA_TEST_EXECUTION_ISSUE_KEY="PRJ=1234" in the command line it works fine.
With it in the command line I have the following error:

│ Cypress Xray Plugin │ INFO │ Uploading Cucumber test results...
An error was thrown in your plugins file while executing the handler for the after:run event.

The error we received was:

TypeError: result.tags is not iterable
at C:\Projects\node_modules\cypress-xray-plugin\src\conversion\importExecutionCucumberMultipart\importExecutionCucumberMultipartConverter.js:20:63
at Array.forEach ()
at ImportExecutionCucumberMultipartConverterServer.convert (C:\Projects\node_modules\cypress-xray-plugin\src\conversion\importExecutionCucumberMultipart\importExecutionCucumberMultipartConverter.js:10:15)
at uploadCucumberResults (C:\Projects\node_modules\cypress-xray-plugin\src\hooks.js:254:170)
at afterRunHook (C:\Projects\node_modules\cypress-xray-plugin\src\hooks.js:193:40)
at C:\Projects\node_modules\cypress-xray-plugin\src\plugin.js:32:40
at Object.handler (C:\Projects\node_modules\cypress-on-fix\index.js:32:29)

As I do not want to generate a new test execution ticket each time, which will also have the standard assignee, I would prefer to use a fixed execution ticket for my test runs.

@csvtuda csvtuda added 🏗 in progress The issue is being worked on and removed awaiting feedback The issue has been addressed and the reporter's feedback is requested labels Aug 24, 2023
@csvtuda csvtuda added awaiting feedback The issue has been addressed and the reporter's feedback is requested and removed 🏗 in progress The issue is being worked on labels Aug 24, 2023
@csvtuda
Copy link
Contributor Author

csvtuda commented Aug 24, 2023

Hey @alexviz7,

version 4.0.3 should fix the error.

@alexviz7
Copy link

alexviz7 commented Aug 25, 2023

I run various tests with or without test execution ticket and I couldn't find a bug anymore. It works Thank you! Ticket can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants