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

[BUG] Pre-request script in collection not triggered if query from collection is run #2620

Open
1 task done
gorillamoe opened this issue Aug 8, 2024 · 2 comments
Open
1 task done

Comments

@gorillamoe
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If I add a pre-request script to the collection and then run a query from that collection, the pre-request script of that collection is not executed.

Expected Behavior

If I add a pre-request script to the collection and then run a query from that collection, the pre-request script of that collection is executed.

Steps To Reproduce

  1. Add a query to a collection
  2. Add a pre-request script to that collection
  3. Run the query in that collection
  4. Pre-request script is not executed

Environment

- OS: Ubuntu 24.04
- Browser: /
- Platform: Snap from Ubuntu Store
- Version: 7.3.4

Additional context

No response

@gorillamoe
Copy link
Author

Okay, by reading the code, I figured out, that you need to enable the checkbox on the query level for the collection pre-request script to take effect.

This seems like a bug to me, because I enable a checkbox on the query level, where the editor is empty to run a script on the collection level?

If this is by intention, I think it would be good to mention this in the docs very prominently.

@imolorhe
Copy link
Collaborator

Fair point. It also seems reasonable to me that the pre-request script enabled on the collection should not depend on the query level check, but I can also see the current behavior as expected 🤔

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

No branches or pull requests

2 participants