Auto Numbering issue on story table

Sudha15
Giga Contributor

Hi Team,

Recently we have enabled Agile application in our dev instance. We found that in story table records are not creating with proper number sequence so we have enabled auto number functionality under story table.

For old records i have run some background script which updates all old records however for new records it's not working as expected.

When I click on Story--> New then story numbering starts from increment of 2. Let's say if my last record was 10000 then next record number is showing as 10002 which is not correct

I checked in number maintenance and counter table also.By default counter value is increased by two instead of one

Can you please help me on this issue why it is increment by two instead of one?

1 ACCEPTED SOLUTION

Thank You Nitesh Balusu for the response!

 

If we enable that property then while creating any record you will not see number information on the form until you submit.

I got an update from HI on the same as below which resolved my issue:

 

Root Cause- 
When current.setAbortAction(true) is used in before business rule, it will increment number counter but the record will not get save. Due to this, there is a gap in numbering. This is a behaviour across the platform. 

Solution :
The behaviour you are seeing is expected behaviour when you have inline insert turned on. If you want to see the consecutive number, you can uncheck "List Edit Insert row" checkbox under list control. So 

1. Go to rm_story.list
2. Right click on the list--> Configure--> LIst control.
3. There you can uncheck List Edit Insert Row check box

 

Regards

Sudha

View solution in original post

4 REPLIES 4

Nitesh Balusu
Giga Guru

By default, numbers are generated every time a new record is created. When records are created but not saved, a gap in the numbering is created. To generate numbers only when records are saved, navigate to System Properties > System and set the property Assign a task number only upon insert (prevents unused numbers) to true

 

http://wiki.servicenow.com/index.php?title=Managing_Record_Numbering#Preventing_Numbering_Gaps.

Thank You Nitesh Balusu for the response!

 

If we enable that property then while creating any record you will not see number information on the form until you submit.

I got an update from HI on the same as below which resolved my issue:

 

Root Cause- 
When current.setAbortAction(true) is used in before business rule, it will increment number counter but the record will not get save. Due to this, there is a gap in numbering. This is a behaviour across the platform. 

Solution :
The behaviour you are seeing is expected behaviour when you have inline insert turned on. If you want to see the consecutive number, you can uncheck "List Edit Insert row" checkbox under list control. So 

1. Go to rm_story.list
2. Right click on the list--> Configure--> LIst control.
3. There you can uncheck List Edit Insert Row check box

 

Regards

Sudha

We had the same issue and I spent way too much time trying to understand it. The number counter entry is being incremented everytime the rm_story list is loaded, so each time you modify a STRY and click Update, each time you click 'Stories' in the navigator, etc.

Very happy to find this fix. The skipped numbers were 'playing with my mind' !

Another benefit is by removing the 'add new row' blank entry at the bottom of the list is that our Scrum Project Manager likes to create some Stories, then go into the list and 'drag-down' the Epic and Theme and Product etc. If he dragged too far and included the blank row, a STRY record was created with only that single field filled-in.

Hi Sudha,

 

I am facing the same issue on the pm_project table

 

As per your instructions I have checked in the pm_project list control the 'List Edit Insert box' is already unchecked but we are facing the issue do you know another way how we can fix it

 

Regards,

Gaurav Singh