Environment: Initial Values, Current Values & synchronization

Describe the bug

I’m not sure whether this is a bug or not, but just trying to figure out how Initial Value and Current Value work. I believe they may have worked differently in the past. We typically work as a team with our environment variables defined so that we share the same values across the team. When we update the value for a variable we would like that same value to synchronize to everyone.

What we’ve observed recently is that the value doesn’t seem to synchronize for another developer’s instance of Postman.

To Reproduce
Steps to reproduce the behavior:

  1. As user A, create a new environment variable with an initial value (VALUE1)
  2. As user B, check what the environment variable is set to (it’ll be VALUE1)
  3. As user B, set the environment variable to VALUE2.
  4. As user A, check to see what the value is set to. You’ll observe that VALUE1 and VALUE2 are now present in the initial & current value fields (not necessarily in that order but they’re now out of sync).
  5. The end result is that we’re no longer able to share one set of variables to all members of the team.

Expected behavior
We just need some way to share environment variables such that everyone on the team gets the variable values when they change. Can this be done? If so, how do we do it.

It seems as if Postman assumes a single “publisher” who will change the environment variables. However, we need everyone to be able to update the “Initial Value”. If there was a way of clearing all of your “Current Value” overrides that’s a valid alternative. Is this possible?

App information (please complete the following information):

  • App Type: Desktop App
  • Postman Version: 7.5.0
  • OS: Mac OS Mojave 10.14.6

Hi @kevinmmd15,

If you wish to automatically persist the current value of variables to the initial value, you should ensure the setting shown in the below screenshot is toggled on. You can view the below screen by clicking on the wrench icon on the top right hand corner in the Postman app. Hope that helps!

@kevinmmd15 - this is indeed a change in how environments behaved in the past.

@aamir.ahmed’s solution is correct if you ALWAYS want to share the values and allow your team members to update them all the time. However, some teams don’t want share the same API keys or they want to ensure that some values remain immutable - and for those use cases, sessions were introduced.

For more info on how Initial Value and Current Value work, check out the FAQs: https://blog.getpostman.com/2018/08/09/sessions-faq/

1 Like