Hi All,
So we are in the process of migrating some data into Jira from another system. I've got a script running that will be able to set the field values, however it can't set them at this point because these custom fields are not on the Edit screen (yet).
Why don't I want to just add them to the Edit screen? Because there are data for thousands of issues in the external system and I want to prime the values before adding them to the screens. Plus we have many hundreds of users and I know from experience if I add anything to the edit screens they will instantly start setting them and then when the script runs and primes the data they will all complain that the data got corrupted.
I tried overrideScreenSecurity and that doesn't work for API from a script (I'm a org admin and used an api token from my org admin account).
So my goal would be to prime the data, validate everything is good to go, then expose the fields on the issue.
Looking for any ideas of suggestions on how to be able to prime this data w/o exposing the fields to all these user who will definitely mess with the fields before they are supposed to.
Hi @jeremyn
You're correct, a field needs to be visible and editable on an issue screen for it to be updated via the API (and the GUI).
I originally thought we could add the custom fields to any applicable screens before you import, and then remove them afterwards, but I can't seem to find a method on the API docs that remove fields from a screen. So instead we can try to swap screens before and after import. This will require a bit of preparation, however.
Here's what we'll need to do:
Then, in your script, do the following:
This process will first replace the screen scheme on all projects with your "bulk import" version, containing all the custom fields necessary for data import. And then once done, you're simply reverting this change.
Now, you are able to create Issue Type Screen Schemes, and Screens, through the API, so you're welcome to try and automate that process too. The methods you'll want to investigate are likely below. I will note, I can't find a method that will let you add fields to a screen of your choice, only the default screen in the instance.
I would recommend testing this against a sandbox environment on Cloud first, to ensure there are no adverse effects.
Thanks Robert, that is a good Idea. I'll have to set it up on our sandbox and try it next week some time, but I think that is probably the most realistic option. I guess I'd just have to do it off-hours (which we don't really have due to global teams) or over a weekend still to avoid people running into the import screens while the script is running.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @jeremyn , come on back here and let me know if it works!
I would recommend testing the import process first to determine how long it will take to import all of your data. You may be able to batch this in smaller sections and run it through the day without impacting your users all too much, but I do recommend an off-hours execution. Holidays work well for that (except for the having to work bit.)
Good luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.