Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3333] Adding code to Jira Submit a Ticket (Steps to Reproduce) cause an error

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2016-03-22T19:51:49.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterCREATIVE KAIZEN
AssigneeMostafizur Rahman
Created2016-03-08T09:48:14.000+0000
Updated2016-03-22T20:18:12.000+0000

Description

Steps to Reproduce

Put classic code in 'Steps to Reproduce Field' (2. jira.png)

Actual Result

1. If fields are filled and OK is pressed user gets Error message (2. error.png). 2. 'Submit a Ticket' window is closed and everything in fields is lost. 3. Ticket is not send.

Expected Result

1. No Error. 2. Better information what cause the error to avoid it. 3. Saving progress (not loosing data from fields) and not closing 'Submit a Ticket' window. 4. Sending a ticket.

Attachments

FileDateSize
2. error.png2016-03-08T09:48:16.000+000025143
2. jira.png2016-03-08T09:48:19.000+000043184
Screen Shot 2016-03-08 at 9.34.10 PM.png2016-03-08T15:41:02.000+000077605
Screen Shot 2016-03-08 at 9.35.33 PM.png2016-03-08T15:41:01.000+000034807
Screen Shot 2016-03-08 at 9.37.07 PM.png2016-03-08T15:41:03.000+0000131700
Screen Shot 2016-03-08 at 9.37.28 PM.png2016-03-08T15:41:04.000+0000190176

Comments

  1. Sharif AbuDarda 2016-03-08

    Hello, I just tried to create JIRA ticket through Appcelerator studio with classic code. I was able to successfully submit the ticket. Please see the attachment. I also tried with Alloy code. Please provide the classic code that you are trying to submit. I will try again with your code. Thanks.
  2. CREATIVE KAIZEN 2016-03-08

    Hello, Thanks for your attention. Code below:
       var filename = 'someImage.jpg';
       
       var file = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename);
       
       var window = Ti.UI.createWindow({
       	backgroundColor: 'white'
       });
       
       	var imageView = Ti.UI.createImageView({
       		top: 0,
       		width: '100%',
       		image: file.nativePath
       	});
       	
       	var shareButton = Ti.UI.createView({
       		height: 100,
       		width: 200,
       		backgroundColor: 'purple',
       		bottom: 0,
       	});
       	
       
       	window.add(imageView);
       	window.add(shareButton); 
       
       
       	shareButton.addEventListener('click', function() {
       		alert('shareClick');
       		
       		var shareIntent = Ti.Android.createIntent({
       	        action: Ti.Android.ACTION_SEND,
       	        type: "image/jpeg"
               });
        
       	    shareIntent.putExtra(Ti.Android.EXTRA_TITLE, 'title');
       	    shareIntent.putExtra(Ti.Android.EXTRA_TEXT, 'text');
       	    shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, file.nativePath);
       	    Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, 'share'));
       		
       	});
       
       window.open();
       
    var filename = 'someImage.jpg'; var file = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, filename); var window = Ti.UI.createWindow({ backgroundColor: 'white' }); var imageView = Ti.UI.createImageView({ top: 0, width: '100%', image: file.nativePath }); var shareButton = Ti.UI.createView({ height: 100, width: 200, backgroundColor: 'purple', bottom: 0, }); window.add(imageView); window.add(shareButton); shareButton.addEventListener('click', function() { alert('shareClick'); var shareIntent = Ti.Android.createIntent({ action: Ti.Android.ACTION_SEND, type: "image/jpeg" }); shareIntent.putExtra(Ti.Android.EXTRA_TITLE, 'title'); shareIntent.putExtra(Ti.Android.EXTRA_TEXT, 'text'); shareIntent.putExtraUri(Ti.Android.EXTRA_STREAM, file.nativePath); Ti.Android.currentActivity.startActivity(Ti.Android.createIntentChooser(shareIntent, 'share')); }); window.open();
  3. CREATIVE KAIZEN 2016-03-08

  4. Sharif AbuDarda 2016-03-22

    Hello, I have tested with the project you referred. The issue I saw was when I just copy the code from the ticket and try to create a JIRA ticket in the studio and paste the ticket in the step to reproduce section I got the error http://postimg.org/image/euwck4r6b/. Now, If I first put the code in a js file in the studio and try formatting it according to the studio default format and then I again copy the code from there and try creating a JIRA ticket. This time, I don't have the error creating the ticket. And the ticket creates successfully. http://postimg.org/image/p0mvzcya7/ http://postimg.org/image/70w0wbh4x/. So, My guess is the issue with unformatted code. This might a default requirement for this studio feature. Which shouldn't be a problem cause when submitting a ticket someone will already have a formatted code to submit. Hope this clears your concern, Thanks.
  5. CREATIVE KAIZEN 2016-03-22

    Hello, You couldn't reproduce before so I gave you example by coping code from ticket to achieve same error. I get same error if I copy code from Appcelerator Studio! And because of that i submited the ticket! It's really annoying bug because I end up on adding tickets via webpage instead Appcelerator because if i get this error I lost everything i wrote. And it would be nice if you would give me time to answer to your comment before closing the ticket just on a guess.

JSON Source