I am sorry, I do not understand the requirement here.
When you create a JIRA issue, it creates a new, unique ID for it.
I think that's clear, but where I'm lost is "How could I tae issue id?" - what do you mean by that? And what are you trying to increment?
First, what do you mean by "created issue number"? Let's say you create a new issue with a key of ABC-123 - do you mean the full key ABC-123, just the numeric part 123, or possibly the immutable ID value in the database (will be a 5 or more digit number)? Second, the easy part - once we know what number you are working with, I'd write a scripted field (in the script runner) that displays that number +1. There are some other options like a little bit of code to add one and just put that in a custom field, and there are scripting add-ons other than script-runner. A scripted field has the advantage that if you're looking at the Key, it will still work if you move the issue. I.e. when you create ABC-123, it will show 124, and if you then move the issue to XYZ and it becomes XYZ-456, the field will show 457. If you actually want to keep the 124, you'll need it posted into a custom field though. I think it might be worth explaining why you want this field though - it sounds utterly useless, which makes me suspect you're trying to solve a real problem in a really bad way. What's the actual problem this solves?
In ID i want only numer field only 123. It Can be 5 digit numer, but I want it unimited starting from "1". But I cant use script-runner, because in my company they don't buy him. It's to expensive. And I must use native Jira solutions. I can do bit of code, but how get issue numer ? :) But when I creating Issue I havent got issue Key yet? Or i don't know something ? In sharepoint I was getting max id ang giving + 1 and was getting creating new element ID? Could I do it in Jira ? How ? :) Please help. In all project in my Company they want have ID field. Because this could unically say about Issue in the project.
Ok, the requirement is just silly. Tell them to use the JIRA Issue key. They already have that, and its unique in the project so the new field is a total waste of time. If they insist on wasting your time, then you can use a post-function, listener or scripted field. You don't get the issue key until the issue is created because JIRA *cannot* know what the next number is going to be until it's taken a lock on the number and is definitely going to create it. In a listener though, the "issue created" event will have the JIRA key, and a scripted field will display it too, as it is generated after the issue is created. Same for a post-function, the key will be there.
It would be better that you understand the full process. Your code doesn't need to be at all complex, but it's worth seeing the full process - see https://developer.atlassian.com/jiradev/jira-platform/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/workflow-plugin-modules
Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs