Giter Site home page Giter Site logo

princenyeche / s2c Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 20 KB

A server to cloud transfer of attachments using REST API.This scripts helps to transfer attachments securely from a Jira server instance to Jira cloud instance

License: MIT License

Python 100.00%
jira-server jira-cloud attachments jira-attachments

s2c's Introduction

ATTACHMENT TRANSFER SCRIPT

  • This scripts helps to transfer attachments securely from a Jira server instance to Jira cloud instance or from a Jira server to Jira server instance.

Config

  • A configuration file exist called config.ini which houses the server and cloud instance details.
    • Depending on the context whether moving from Jira server to cloud or vice versa, please assume source section to be your "source instance detail" and target section to be your "destination instance detail".
  • Only change the fields where the comment mentioned it can be changed.
  • Do not change the server or cloud sections.
  • Open the attachment_transfer.py file and edit the JQL syntax needed on line 36.
    • You can use any valid JQL to search for multiple project even, the returned result is what the script uses to search for attachments.

Requirement

  • This script requires python >= 3.6.x so download the versions higher or equivalent to it to use the script.
  • Install the requirements from the requirements.txt file

Check your python version by running

python -v

Before running the below command

pip install -r requirements.txt

Run

  • To start up the script, go to your terminal or command prompt and type
python attachment_transfer.py

Assuming that you're already on python 3 the above should work.

s2c's People

Contributors

princenyeche avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

darknos

s2c's Issues

Login problem

Hi Prince,

First of all, thanks a lot for the code for transferring attachments from one Jira instance to another.
I am trying to transfer attachments from Server to Datacenter but facing some problem regarding Server Login (Error: Server credentials might be wrong) but I have tried multiple times with correct login details, same error I am getting. May be Jira login module is not working correctly for me.

I am able to login into Server using the below basic login, Could you please release another version of your code which includes the below login, so that it will be useful for all those persons who are facing similar problem.
Thank you so much.

[
from jira import JIRA
jiraOptions = {'server': "http://localhost:8080/"}
jira = JIRA(options=jiraOptions, basic_auth=("user1", "admin"))
for singleIssue in jira.search_issues(jql_str='project = "Test Software Project" and issuetype = Story'):
print('{}: {}:{}'.format(singleIssue.key, singleIssue.fields.summary,
singleIssue.fields.reporter.displayName))
]

Getting: KeyError: 'attachment'

Hi Prince,

First of all, thank you for this code. I have tested it on a test project and it is working fine.
However, on a specific project with thousands of issues, I keep on getting : KeyError: 'attachment'

I checked my permission on the project on both Server and Cloud already.
Do you know the possible reason for this?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.