Two new copper complexes [CuI4(L2)I5]n (1, L2 = 3,5-bis(1-ethylpyridinium-4-yl)-1,2,4-triazol-4-ide) and [CuI6(L3)3Br3]n (2, L3 = 3,5-bis(4-pyridyl)-1,2,4-triazolate) were obtained from the solvothermal reactions of different copper halides with 2,5-bis(4-pyridyl)-1,3,4-oxadiazole (L1) in the presence of aqueous ammonia. The X-ray diffraction, IR spectrum and elemental analyses of 1 and 2 clearly show that the 1,3,4-oxadiazole ligand L1 has transformed into the triazolate ligands L2 and L3. Most fascinatingly, 1 represents the first example of an integrated reaction system involving heterocyclic conversion from oxadiazole to triazolate, N-alkylation, and further self-assembly of the in situ generated ligand L2 with metal cations to form a coordination polymer in one solvothermal spot. The possible formation mechanism of 1 is proposed, and in addition, the interesting topologies and luminescence properties of 2 are studied based on the results of the DFT calculations.