Easy to get duplicate Station Catalog Numbers

tim.plunkett - October 1, 2009 - 14:33
Project:Station
Version:6.x-2.x-dev
Component:Catalog
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

When two users attempt to add items to the catalog, both entry forms are assigned the same catalog number, and when they submit, whoever submits second gets an error.
This doesn't happen with node ids, since it's an auto-increment field.

I'm not too familiar with auto-increment, but would changing station_catalog.number to auto-increment solve this problem?

#1

drewish - October 1, 2009 - 17:08

humm... that's definitely a problem. i didn't use an serial integer field because i wanted people to be able to assign arbitrary numbers. we had a huge library that was already numbered.

#2

drewish - October 1, 2009 - 17:08
Title:Auto-Increment of Station Catalog Number» Easy to get duplicate Station Catalog Numbers
Category:feature request» bug report
Priority:normal» critical

#3

tim.plunkett - October 19, 2009 - 20:13

This is becoming more and more of an issue. I can't figure out exactly how to remove all the checks to station_catalog.number, because I'm not sure which ones are contrived and which will break all the code.
Any help on this?

#4

drewish - October 19, 2009 - 20:26

humm... i'm not sure what the best way to approach this would be... maybe allow the value to be blank and if so a TABLE LOCK; SELECT MAX(); INSERT; UNLOCK?

 
 

Drupal is a registered trademark of Dries Buytaert.