Creating JIRA issues with Jira4R - ruby-on-rails

I'm trying to write a small Rails app that will interface with Jira using the Jira4R gem. However, whilst I'm having no problem creating an issue, I'm having real trouble attaching a custom field to an issue.
Any ideas on how I would do this?
At the moment I'm creating the issue like:
issue = Jira4R::V2::RemoteIssue.new
issue.project = "TEST"
issue.summary = params[:issue][:summary]
issue.description = params[:issue][:description]
issue.type = 6
issue = #jira.createIssue(issue)

issue = Jira4R::V2::RemoteIssue.new
issue.project = "TEST"
issue.summary = params[:issue][:summary]
issue.description = params[:issue][:description]
issue.type = 6
c = Jira4R::V2::RemoteCustomFieldValue.new
c.customfieldId = "customfield_10000"
c.values = current_user.full_name
issue.customFieldValues = [c]
issue = #jira.createIssue(issue)

Related

Having an issue targeting an element of a table in a table Lua 5.2

Probably a simple question but I'm new to lualang(5.2) and Im having an issue with my code here:
local petProductivity, petLeisure, petCommunication, petExercise, petDiet, petSleep
local pet = {petName,
mentalHealth = {petProductivity = 5, petLeisure = 5, petCommunication = 5, mentalHealthAverage},
physicalHealth = {petExercise = 5, petDiet =5, petSleep = 5, physicalHealthAverage},
speech = 0,}
local mentalHealthAverage = (pet[2][1] + pet[2][2] + pet[2][3]) /3
local physicalHealthAverage = (pet[3][1] + pet[3][2] + pet[3][3]) /3
My error looks like this: attempt to index field '?' (a nil value)
Another thread was created to tackle the same issue but their solutions were no help to me. Any assistance is appreciated!

Offlineimap stops retrieving after first 20-30 messages

I have been trying to set up offlineimap to sync mail from gmail to the local folders on my mac machine.
The issue with my current set-up is that, offlineimap will start to sync the mail from both accounts, I can see lines like -
Copy message 3 (3 of 10966) repo1_remote:[Gmail]/Important -> repo1_local
But, after around 20-30 copy message, these lines just stop. Offlineimap is still connected though, it refreshes after 10 minutes and syncs again but, I cant see any more copy message lines in the repos any longer, it just stops. I can see these new 20-30 new messages in mutt, but not more. Killing and restarting offlineimap agains copies 20-30 new messages and again stops. I have no clue as to what is wrong. I guess it should copy all messages locally. Here is my offlineimaprc. I have the python file set up correctly.
[general]
metadata = ~/.offlineimap
accounts = repo1, repo2
maxsyncaccounts = 10
#ui = blinkenlights
ui = ttyui
pythonfile = ~/Development/OfflineIMAP/mail/offlineimap.py
#socktimeout = 60
[mbnames]
[Account repo2]
localrepository = repo2_local
remoterepository = repo2_remote
autorefresh = 10
status_backend = sqlite
synclabels = yes
[Account repo1]
localrepository = repo1_local
remoterepository = repo1_remote
autorefresh = 10
status_backend = sqlite
synclabels = yes
[Repository repo2_local]
type = GmailMaildir
nametrans = get_remote_name
localfolders = ~/Development/OfflineIMAP/mail/repo2
sep = /
restoreatime = yes
[Repository repo1_local]
type = GmailMaildir
nametrans = get_remote_name
localfolders = ~/Development/OfflineIMAP/mail/repo1
sep = /
restoreatime = yes
[Repository repo2_remote]
type = Gmail
folderfilter = is_included
nametrans = get_local_name
cert_fingerprint = 3ffdb8519c1c8242ce8387d3d9fccc208a776b4a
remoteuser = asd#gmail.com
remotepasseval = get_password('asd')
usecompression = yes
maxconnections = 3
[Repository repo1_remote]
type = Gmail
folderfilter = is_included
nametrans = get_local_name
cert_fingerprint = 3ffdb8519c1c8242ce8387d3d9fccc208a776b4a
remoteuser = qwe#gmail.com
remotepasseval = get_password('qwe')
usecompression = yes
maxconnections = 3
I would like to know what is preventing offlineimap from copying further messages and what should I change in the config to make it work properly.
I've just recently ran into the same problem with gmail. In my case disabling compression and setting connections limit to 1 resolved the issue (didn't have time to investigate fully). Have you tried doing this?

ELKI CSV parser problems

I have changed an .arff file to a .csv file in a tool in Weka.
But now I can't use the arffparser as parser in ELKI.
What parser should I then use? The default is NumberVectorLabelParser. But it gives me a ArrayIndexOutOfBoundsException:
Running: -verbose -verbose -dbc.in /home/db/lisbet/Datasets/without ids/try 2/calling them .txt using another parser/Lymphography_withoutdupl_norm_1ofn.csv -dbc.parser NumberVectorLabelParser -algorithm outlier.lof.LOF -lof.k 2 -evaluator outlier.OutlierROCCurve -rocauc.positive yes
Task failed
java.lang.ArrayIndexOutOfBoundsException: 47
at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.getTypeInformation(NumberVectorLabelParser.java:337)
at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.buildMeta(NumberVectorLabelParser.java:242)
at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.nextEvent(NumberVectorLabelParser.java:211)
at de.lmu.ifi.dbs.elki.datasource.bundle.MultipleObjectsBundle.fromStream(MultipleObjectsBundle.java:242)
at de.lmu.ifi.dbs.elki.datasource.parser.AbstractStreamingParser.asMultipleObjectsBundle(AbstractStreamingParser.java:89)
at de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection.loadData(InputStreamDatabaseConnection.java:91)
at de.lmu.ifi.dbs.elki.database.StaticArrayDatabase.initialize(StaticArrayDatabase.java:119)
at de.lmu.ifi.dbs.elki.workflow.InputStep.getDatabase(InputStep.java:62)
at de.lmu.ifi.dbs.elki.KDDTask.run(KDDTask.java:108)
at de.lmu.ifi.dbs.elki.application.KDDCLIApplication.run(KDDCLIApplication.java:60)
at [...]
My .csv file looks like this:
'Lymphatics = deformed','Lymphatics = displaced','Lymphatics = arched','Lymphatics = normal','Block_of_affere = yes','Block_of_affere = no','Bl_of_lymph_c = no','Bl_of_lymph_c = yes','Bl_of_lymph_s = no','Bl_of_lymph_s = yes','By_pass = no','By_pass = yes','Extravasates = yes','Extravasates = no','Regeneration_of = no','Regeneration_of = yes','Early_uptake_in = yes','Early_uptake_in = no','Changes_in_lym = oval','Changes_in_lym = round','Changes_in_lym = bean','Defect_in_node = lacunar','Defect_in_node = lac_central','Defect_in_node = lac_margin','Defect_in_node = no','Changes_in_node = lac_central','Changes_in_node = lacunar','Changes_in_node = no','Changes_in_node = lac_margin','Changes_in_stru = faint','Changes_in_stru = drop_like','Changes_in_stru = stripped','Changes_in_stru = coarse','Changes_in_stru = diluted','Changes_in_stru = grainy','Changes_in_stru = no','Changes_in_stru = reticular','Special_forms = vesicles','Special_forms = no','Special_forms = chalices','Dislocation_of = no','Dislocation_of = yes','Exclusion_of_no = yes','Exclusion_of_no = no',Lym_nodes_dimin,Lym_nodes_enlar,No_of_nodes_in,Outlier
1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0.333333,0.285714,no
0,1,0,0,1,0,1,0,1,0,1,0,0,1,1,0,1,0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0.333333,0.142857,no
There are 11 parsers available. But maybe it is my data, that is to large for the parser.
Thank you, this is a bug in the ELKI CSV parser.
It did not expect the class column to have a label.
So if your remove the ,Outlier part of your first line (or the first line completely), it should read this file just fine.
I will push a change that makes it more robust here (it will still lose the label though, because ELKI currently has support column labels for numerical columns but not for string label columns).

RightFax 10.0 Integration With C#

If I insert the values into the corresponding tables of RightFax, does it FAX automatically or do i need to write the following code for that?
RFCOMAPILib.FaxServerClass faxserver = new RFCOMAPILib.FaxServerClass();
faxserver.ServerName = "ServerName";
faxserver.Protocol = RFCOMAPILib.CommunicationProtocolType.cpNamedPipes;
faxserver.UseNTAuthentication = RFCOMAPILib.BoolType.True;
faxserver.OpenServer();
RFCOMAPILib.Fax fax = (RFCOMAPILib.Fax) faxserver.get_CreateObject(RFCOMAPILib.CreateObjectType.coFax);
// set up your 'fax' object the way you want it, below is just some sample options
fax.ToName = "John Doe";
fax.ToFaxNumber = "4255551111";
fax.ToVoiceNumber = "4255550000";
fax.ToCompany = "ACME";
fax.FromName = "My Company";
fax.FromVoiceNumber = "4255552222";
fax.Send();
Can you please provide me sample code for attachments? If RightFax sends the FAX automatically then which tables do I need to fill-in in order to do that?
Thanks
the below code is vb.net but will show you how to send a fax and add attachment as well, hope this helps. I've written a post about this here but here's the code below ....
Dim FaxAPI As RFCOMAPILib.FaxServer
Dim fFax As RFCOMAPILib.Fax
FaxAPI = New RFCOMAPILib.FaxServer
FaxAPI.ServerName =something
FaxAPI.Protocol = RFCOMAPILib.CommunicationProtocolType.cpTCPIP
FaxAPI.UseNTAuthentication = RFCOMAPILib.BoolType.False
FaxAPI.AuthorizationUserID = something
FaxAPI.AuthorizationUserPassword = something
FaxAPI.OpenServer()
fFax = FaxAPI.CreateObject(RFCOMAPILib.CreateObjectType.coFax)
fFax.Attachments.Add(“D:\FilePickupIn\2222222222-20110322142718-01.tif”)
fFax.HasCoversheet = RFCOMAPILib.BoolType.False
fFax.ToFaxNumber = something
fFax.ToName = something
fFax.Send()
FaxAPI.CloseServer()
FaxAPI = Nothing
fFax = Nothing
happy to help if you get stuck with anything...

Adding contact to the phone book using code?

In WP7.5(Mango), is it possible to add a contact to the phone book through code?
Currently there is no API to save the contact directly from the code as it deals with user data.
But you can save the contact from your application by using the SaveContactTask with user intervention.
you can use the following code
SaveContactTask saveContactTask = new SaveContactTask();
saveContactTask.Company = "WindowsPhoneGeek";
saveContactTask.FirstName = "John";
saveContactTask.LastName = "Smith";
saveContactTask.HomePhone = "000-125-547";
saveContactTask.HomeAddressCity = "London";
saveContactTask.HomeAddressCountry = "UK";
saveContactTask.HomeAddressStreet = "123 Bake Road";
saveContactTask.HomeAddressZipCode = "W11 2BQ";
saveContactTask.JobTitle = "Software Developer";
saveContactTask.Show();
You can refer this blog for the more information.
Yes there is. You should use the new API,
using Microsoft.Phone.Tasks;
SaveContactTask newContact = new SaveContactTask();
newContact.FirstName = "x";
newContact.LastName = "Y";
newContact.MobilePhone = "0123456789";
newContact.Show();
Also refer this http://msdn.microsoft.com/en-us/library/hh202995(v=vs.92).aspx

Resources