Suppose a space $X'$ is obtained from $X$ by attaching an $i$-cell, i.e., $$X' = X \cup_\phi e^i$$ where $\phi: \partial e^i \to X$ is the attaching map. Let $G$ be a structure group, and $P$ be a principal $G$-bundle on $X'$, classified by the map $f: X \to BG$. The bundle $P$ can be assembled from its restrictions to $X$ and $e^i$, together with descent data; there is a pushout square
$$ \require{AMScd} \begin{CD} \partial e^i \times G @>>> e^i \times G \\ @VV{\tilde{\phi}}V @VVV\\ P|_X @>>> P. \end{CD} $$
The map $\tilde{\phi}$ is a bundle map over $\phi$, and is in principle determined by the classifying map $f$.
What is the attaching map $\tilde{\phi}$ in terms of $f$?
In other words, what's the map $$\tilde{\phi}: G \times \partial e^i \cong EG \times_{BG} \partial e^i \xrightarrow{1 \times \phi} EG \times_{BG} X = P|_X?$$
From this perspective, we see that choices of isomorphisms are involved.
If it helps, restrict to the case where $X$ is contractible. Then $P|_X \cong X \times G$, and $\tilde{\phi}$ is determined by a map $$\partial e^i \times G \to G.$$ If the homotopy class of $f$ is known, can we write down an equation for the homotopy class of this map?
Here is a related question.